summaryrefslogtreecommitdiffstats
path: root/macos.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-10-13 10:32:33 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-10-13 10:32:33 -0700
commit50421f1fa8c6d999d13348a89527df7adcc02fd9 (patch)
treeba5bfa5d744a4e62fb6392294b65eecb27577484 /macos.c
parentec8f2176a7d565ab55c00bebe0f31ae83c368945 (diff)
downloadsubsurface-50421f1fa8c6d999d13348a89527df7adcc02fd9.tar.gz
Make sure our default path exists (for Linux and Mac)
I'm not sure if this could ever turn into an issue on Windows - but on Linux and Mac this is an easy and safe thing to do and it avoids a situation where we try to save the picture hashes without having this directory. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'macos.c')
-rw-r--r--macos.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/macos.c b/macos.c
index aa2be4b3b..ece7c83a1 100644
--- a/macos.c
+++ b/macos.c
@@ -56,6 +56,8 @@ static const char *system_default_path_append(const char *append)
memset(buffer, 0, len);
strcat(buffer, home);
strcat(buffer, path);
+ // make sure this path exists
+ subsurface_mkdir(buffer);
if (append) {
strcat(buffer, "/");
strcat(buffer, append);