aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--linux.c3
-rw-r--r--macos.c2
2 files changed, 5 insertions, 0 deletions
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 <string.h>
#include <sys/types.h>
#include <dirent.h>
@@ -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);
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);