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:
authorLipu Fei <lipu.fei815@gmail.com>2017-09-04 15:08:03 +0300
committerLipu Fei <lipu.fei815@gmail.com>2017-09-04 15:08:03 +0300
commitb70a89d0e1c5f130d8538e05eb889e9fcc21ec8c (patch)
tree33c18d04c98251bd76569f99ceb0f8b05ad987e4 /cura_app.py
parent20ffb0cd6d77354f5882582f9fea07f7f3aeb2c4 (diff)
Fix stdout and stderr redirecting file location
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")