diff options
-rw-r--r-- | src/contrib/files.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/contrib/files.c b/src/contrib/files.c index 736cbca59..f3a4b78e6 100644 --- a/src/contrib/files.c +++ b/src/contrib/files.c @@ -92,9 +92,13 @@ static int remove_file(const char *path, const struct stat *stat, int type, stru { (void)stat; (void)ftw; - if (type == FTW_DP) { + + switch (type) { + case FTW_D: + case FTW_DNR: + case FTW_DP: return rmdir(path); - } else { + default: return unlink(path); } } |