summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--toolbox/rm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toolbox/rm.c b/toolbox/rm.c
index 3a24becb6..127cbc450 100644
--- a/toolbox/rm.c
+++ b/toolbox/rm.c
@@ -103,8 +103,8 @@ int rm_main(int argc, char *argv[])
ret = unlink_recursive(argv[i], flags);
} else {
ret = unlink(argv[i]);
- if (errno == ENOENT && (flags & OPT_FORCE)) {
- return 0;
+ if (ret < 0 && errno == ENOENT && (flags & OPT_FORCE)) {
+ continue;
}
}