Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'cura_app.py')
-rwxr-xr-xcura_app.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/cura_app.py b/cura_app.py
index 1d8867f1f4..2e406f99d3 100755
--- a/cura_app.py
+++ b/cura_app.py
@@ -54,8 +54,17 @@ import Arcus #@UnusedImport
import cura.CuraApplication
import cura.Settings.CuraContainerRegistry
+def get_cura_dir_path():
+ if Platform.isWindows():
+ return os.path.expanduser("~/AppData/Local/cura/")
+ elif Platform.isLinux():
+ return os.path.expanduser("~/.local/share/cura")
+ elif Platform.isOSX():
+ return os.path.expanduser("~/Library/Application Support/cura")
+
+
if hasattr(sys, "frozen"):
- dirpath = os.path.expanduser("~/AppData/Local/cura/")
+ dirpath = get_cura_dir_path()
os.makedirs(dirpath, exist_ok = True)
sys.stdout = open(os.path.join(dirpath, "stdout.log"), "w")
sys.stderr = open(os.path.join(dirpath, "stderr.log"), "w")