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:
authorGhostkeeper <rubend@tutanota.com>2019-03-26 14:04:46 +0300
committerGhostkeeper <rubend@tutanota.com>2019-03-26 14:04:46 +0300
commita4924d26951e7d9260ec66e78578c2d283935d39 (patch)
treee88484c5634acb310483837716fbdd062e90eab3 /cura_app.py
parent07ea8221c10693ca668c62d43a271ea1b4c36643 (diff)
Fix for weird home directories on Windows
The expanduser function will expand to a combination of HOMEDRIVE and HOMEPATH which might not be the same as APPDATA if your configuration is very weird (e.g. you've changed your APPDATA location). Contributes to CURA-6418.
Diffstat (limited to 'cura_app.py')
-rwxr-xr-xcura_app.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/cura_app.py b/cura_app.py
index 3224a5b99b..1978e0f5fd 100755
--- a/cura_app.py
+++ b/cura_app.py
@@ -23,7 +23,10 @@ known_args = vars(parser.parse_known_args()[0])
if not known_args["debug"]:
def get_cura_dir_path():
if Platform.isWindows():
- return os.path.expanduser("~/AppData/Roaming/" + CuraAppName)
+ appdata_path = os.getenv("APPDATA")
+ if not appdata_path: #Defensive against the environment variable missing (should never happen).
+ appdata_path = "."
+ return os.path.join(appdata_path, CuraAppName)
elif Platform.isLinux():
return os.path.expanduser("~/.local/share/" + CuraAppName)
elif Platform.isOSX():