diff options
-rw-r--r-- | common/definitions.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/common/definitions.cpp b/common/definitions.cpp index 3fc4700..4bf3da4 100644 --- a/common/definitions.cpp +++ b/common/definitions.cpp | |||
@@ -40,10 +40,12 @@ QString Sink::configLocation() | |||
40 | 40 | ||
41 | QString Sink::temporaryFileLocation() | 41 | QString Sink::temporaryFileLocation() |
42 | { | 42 | { |
43 | auto path = dataLocation() + "/temporaryFiles"; | 43 | static auto path = dataLocation() + "/temporaryFiles"; |
44 | //FIXME create in a singleton on startup? | 44 | static bool initialized = false; |
45 | QDir dir; | 45 | if (!initialized) { |
46 | dir.mkpath(path); | 46 | QDir{}.mkpath(path); |
47 | initialized = true; | ||
48 | } | ||
47 | return path; | 49 | return path; |
48 | } | 50 | } |
49 | 51 | ||