From e4a61c3572a5850158b5f47152062a7ed7caf53b Mon Sep 17 00:00:00 2001 From: Linus Dierheimer Date: Sat, 8 May 2021 16:56:37 +0200 Subject: [PATCH] updated initCacheDir --- src/common/init.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/init.c b/src/common/init.c index a1984532b..038112299 100644 --- a/src/common/init.c +++ b/src/common/init.c @@ -76,6 +76,8 @@ static void initCacheDir(FFstate* state) ffStrbufAppendS(&state->cacheDir, state->passwd->pw_dir); ffStrbufAppendS(&state->cacheDir, "/.cache/"); } + else if(state->cacheDir.chars[state->cacheDir.length - 1] != '/') + ffStrbufAppendC(&state->cacheDir, '/'); mkdir(state->cacheDir.chars, S_IRWXU | S_IXGRP | S_IRGRP | S_IXOTH | S_IROTH); //I hope everybody has a cache folder but whow knews