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:
authorArjen Hiemstra <ahiemstra@heimr.nl>2015-10-05 19:32:44 +0300
committerArjen Hiemstra <ahiemstra@heimr.nl>2015-10-05 19:32:44 +0300
commitba863526425e1c6092a65f16e8ba4f3c8b5bdb8f (patch)
treef8a6015234341040d4215cf922c39e3bd850f1b8 /cura_app.py
parent07d35a343906252585a2f2a2dadf6a1a00c85f4f (diff)
Fix issues with crash handler and log file creation on Windows
Diffstat (limited to 'cura_app.py')
-rwxr-xr-xcura_app.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/cura_app.py b/cura_app.py
index ee8211f818..e71fbd6515 100755
--- a/cura_app.py
+++ b/cura_app.py
@@ -14,9 +14,11 @@ sys.excepthook = exceptHook
import cura.CuraApplication
if sys.platform == "win32" and hasattr(sys, "frozen"):
- import os.path
- sys.stdout = open(os.path.expanduser("~/AppData/Local/cura/stdout.log"), "w")
- sys.stderr = open(os.path.expanduser("~/AppData/Local/cura/stderr.log"), "w")
+ import os
+ dirpath = os.path.expanduser("~/AppData/Local/cura/")
+ 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")
app = cura.CuraApplication.CuraApplication.getInstance()
app.run()