summaryrefslogtreecommitdiff
path: root/src/basic/rm-rf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/basic/rm-rf.c')
-rw-r--r--src/basic/rm-rf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/rm-rf.c b/src/basic/rm-rf.c
index 14f8474da0..4807561723 100644
--- a/src/basic/rm-rf.c
+++ b/src/basic/rm-rf.c
@@ -82,7 +82,7 @@ int rm_rf_children(int fd, RemoveFlags flags, struct stat *root_dev) {
errno = 0;
de = readdir(d);
if (!de) {
- if (errno != 0 && ret == 0)
+ if (errno > 0 && ret == 0)
ret = -errno;
return ret;
}