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.
This commit is contained in:
Michael Drake 2014-04-18 17:12:52 +01:00
parent 2a4f7f6b65
commit d1223950d7

View File

@ -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);