From d1223950d76a0293d3bb09f4584bae5ab5a34333 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Fri, 18 Apr 2014 17:12:52 +0100 Subject: Handle some directories already existing. When creating the path to the cache directory we were giving up on the first directory that already existed. This prevented the path to the cache directory getting made, which prevented view-source from working if the path was only patially available. --- utils/filename.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/filename.c b/utils/filename.c index 15642040b..45bc9a6c6 100644 --- a/utils/filename.c +++ b/utils/filename.c @@ -186,7 +186,7 @@ bool filename_initialise(void) *start = '\0'; LOG(("Creating \"%s\"", directory)); ret = nsmkdir(directory, S_IRWXU); - if (ret != 0) { + if (ret != 0 && errno != EEXIST) { LOG(("Failed to create directory \"%s\"", directory)); free(directory); -- cgit v1.2.3