mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:07:35 +00:00
rm: Exit with status 0 if stat fails and force is set
This commit is contained in:
parent
46c15276e9
commit
5ee7e9ab64
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…
Add table
Add a link
Reference in a new issue