mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-25 11:51:41 -07:00
Merge pull request #5511 from Ultimaker/fix_weird_home_directories_windows
Fix for weird home directories on Windows
This commit is contained in:
commit
79c13ce35c
1 changed files with 4 additions and 1 deletions
|
|
@ -23,7 +23,10 @@ known_args = vars(parser.parse_known_args()[0])
|
||||||
if not known_args["debug"]:
|
if not known_args["debug"]:
|
||||||
def get_cura_dir_path():
|
def get_cura_dir_path():
|
||||||
if Platform.isWindows():
|
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():
|
elif Platform.isLinux():
|
||||||
return os.path.expanduser("~/.local/share/" + CuraAppName)
|
return os.path.expanduser("~/.local/share/" + CuraAppName)
|
||||||
elif Platform.isOSX():
|
elif Platform.isOSX():
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue