mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
ls: Fix duplicated error message when opening a directory fails
This commit is contained in:
parent
70f707d806
commit
732e41714a
Notes:
sideshowbarker
2024-07-17 21:39:29 +09:00
Author: https://github.com/mrkct Commit: https://github.com/SerenityOS/serenity/commit/732e41714a6 Pull-request: https://github.com/SerenityOS/serenity/pull/11625
1 changed files with 3 additions and 1 deletions
|
@ -148,8 +148,10 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
metadata.name = path;
|
||||
|
||||
int rc = lstat(String(path).characters(), &metadata.stat);
|
||||
if (rc < 0)
|
||||
if (rc < 0) {
|
||||
perror("lstat");
|
||||
continue;
|
||||
}
|
||||
|
||||
files.append(metadata);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue