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