From 74e7a207fa1504872f43e00837106d3e40f6a547 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sun, 6 Dec 2020 16:17:58 +0100 Subject: [PATCH] Fix deleting configuration directories with hidden files. We incorrectly skipped files starting with a dot when deleting directories. This is a problem on macOS, which might add .DS_Store files. --- src/conf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/conf.c b/src/conf.c index 1ed5ff61..dd076170 100644 --- a/src/conf.c +++ b/src/conf.c @@ -79,7 +79,9 @@ static bool deltree(const char *dirname) { while((ent = readdir(d))) { if(ent->d_name[0] == '.') { - continue; + if(!ent->d_name[1] || (ent->d_name[1] == '.' && !ent->d_name[2])) { + continue; + } } char filename[PATH_MAX]; -- 2.39.5