From 50421f1fa8c6d999d13348a89527df7adcc02fd9 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 13 Oct 2015 10:32:33 -0700 Subject: 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 --- linux.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'linux.c') diff --git a/linux.c b/linux.c index d4131c7ea..6133c262d 100644 --- a/linux.c +++ b/linux.c @@ -3,6 +3,7 @@ #include "dive.h" #include "display.h" #include "membuffer.h" +#include "qthelperfromc.h" #include #include #include @@ -63,6 +64,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); -- cgit v1.2.3-70-g09d2