diff --git a/Userland/rm.cpp b/Userland/rm.cpp index 7cd575f198..087f855ece 100644 --- a/Userland/rm.cpp +++ b/Userland/rm.cpp @@ -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) {