mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:28:12 +00:00
ls: Fix duplicated error message when opening a directory fails
This commit is contained in:
parent
70f707d806
commit
732e41714a
1 changed files with 3 additions and 1 deletions
|
@ -148,8 +148,10 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
metadata.name = path;
|
metadata.name = path;
|
||||||
|
|
||||||
int rc = lstat(String(path).characters(), &metadata.stat);
|
int rc = lstat(String(path).characters(), &metadata.stat);
|
||||||
if (rc < 0)
|
if (rc < 0) {
|
||||||
perror("lstat");
|
perror("lstat");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
files.append(metadata);
|
files.append(metadata);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue