summaryrefslogtreecommitdiff
path: root/utils/filename.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-04-18 17:12:52 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2014-04-18 17:12:52 +0100
commitd1223950d76a0293d3bb09f4584bae5ab5a34333 (patch)
tree5150ebf0b6052c1c364cc4d952324fdaa519141a /utils/filename.c
parent2a4f7f6b65d8e40a14533e532dedfadce2691456 (diff)
downloadnetsurf-d1223950d76a0293d3bb09f4584bae5ab5a34333.tar.gz
netsurf-d1223950d76a0293d3bb09f4584bae5ab5a34333.tar.bz2
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.
Diffstat (limited to 'utils/filename.c')
-rw-r--r--utils/filename.c2
1 files changed, 1 insertions, 1 deletions
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);