mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 06:33:55 -06:00
Fix issues with crash handler and log file creation on Windows
This commit is contained in:
parent
07d35a3439
commit
ba86352642
2 changed files with 6 additions and 5 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue