1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:34:59 +00:00

ls: Fix duplicated error message when opening a directory fails

This commit is contained in:
Marco Cutecchia 2022-01-04 21:19:23 +01:00 committed by Andreas Kling
parent 70f707d806
commit 732e41714a

View file

@ -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);
}