use os.path.expanduser to get home dir on Unix
It works even if HOME is not set.
This commit is contained in:
parent
6e7854fd05
commit
c0ae601f3c
@ -215,9 +215,9 @@ def get_default_cache():
|
|||||||
|
|
||||||
return os.path.join(cache_root, "HereRocks", "Cache")
|
return os.path.join(cache_root, "HereRocks", "Cache")
|
||||||
else:
|
else:
|
||||||
home = os.getenv("HOME")
|
home = os.path.expanduser("~")
|
||||||
|
|
||||||
if home is None:
|
if home == "~":
|
||||||
return None
|
return None
|
||||||
else:
|
else:
|
||||||
return os.path.join(home, ".cache", "hererocks")
|
return os.path.join(home, ".cache", "hererocks")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user