summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--linux.c3
-rw-r--r--macos.c2
-rw-r--r--main.cpp1
-rw-r--r--qthelper.h1
4 files changed, 2 insertions, 5 deletions
diff --git a/linux.c b/linux.c
index 6133c262d..d4131c7ea 100644
--- a/linux.c
+++ b/linux.c
@@ -3,7 +3,6 @@
#include "dive.h"
#include "display.h"
#include "membuffer.h"
-#include "qthelperfromc.h"
#include <string.h>
#include <sys/types.h>
#include <dirent.h>
@@ -64,8 +63,6 @@ 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 ece7c83a1..aa2be4b3b 100644
--- a/macos.c
+++ b/macos.c
@@ -56,8 +56,6 @@ 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/main.cpp b/main.cpp
index f27a17474..171876abf 100644
--- a/main.cpp
+++ b/main.cpp
@@ -36,6 +36,7 @@ int main(int argc, char **argv)
const char *default_directory = system_default_directory();
const char *default_filename = system_default_filename();
+ subsurface_mkdir(default_directory);
for (i = 1; i < arguments.length(); i++) {
QString a = arguments.at(i);
diff --git a/qthelper.h b/qthelper.h
index f5457b1a9..a2b7b6c39 100644
--- a/qthelper.h
+++ b/qthelper.h
@@ -130,5 +130,6 @@ bool parseGpsText(const QString &gps_text, double *latitude, double *longitude);
QByteArray getCurrentAppState();
void setCurrentAppState(QByteArray state);
extern "C" bool in_planner();
+extern "C" void subsurface_mkdir(const char *dir);
#endif // QTHELPER_H