mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
rm: Exit with status 0 if stat fails and force is set
This commit is contained in:
parent
46c15276e9
commit
5ee7e9ab64
Notes:
sideshowbarker
2024-07-19 01:47:37 +09:00
Author: https://github.com/wezm 🔰 Commit: https://github.com/SerenityOS/serenity/commit/5ee7e9ab647 Pull-request: https://github.com/SerenityOS/serenity/pull/3824
1 changed files with 1 additions and 1 deletions
|
@ -41,7 +41,7 @@ static int remove(bool recursive, bool force, String path)
|
|||
if (lstat(path.characters(), &path_stat) < 0) {
|
||||
if (!force)
|
||||
perror("lstat");
|
||||
return 1;
|
||||
return force ? 0 : 1;
|
||||
}
|
||||
|
||||
if (S_ISDIR(path_stat.st_mode) && recursive) {
|
||||
|
|
Loading…
Reference in a new issue