aboutsummaryrefslogtreecommitdiff
path: root/src/fs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs.c')
-rw-r--r--src/fs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/fs.c b/src/fs.c
index b6ec372..b2c94c8 100644
--- a/src/fs.c
+++ b/src/fs.c
@@ -206,7 +206,9 @@ rmextra(const char *path, struct hmap *preserved, preremove_fn cb,
{
ssize_t removed = 0;
DIR *dir = opendir(path);
- if (dir == NULL) return -1;
+ if (dir == NULL) {
+ return dry ? 0 : -1;
+ }
struct dirent *ent;
while ((ent = readdir(dir))) {