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