summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2014-07-30 14:07:36 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2014-08-01 15:26:11 +0800
commit3701b320a53de2920ffb96982b40d8204d95d504 (patch)
tree0272232d5ad9508527c9e9d21470d198a504df82
parentac9379afa6192b6606c18ff60874908de3d8fe8e (diff)
downloadgobject-introspection-3701b320a53de2920ffb96982b40d8204d95d504.tar.gz
giscanner/cachestore.py: Clean up a bit
Use the special os.path.expanduser('~'), as it it more portable, instead of quering the HOME or HOMEPATH envvar. https://bugzilla.gnome.org/show_bug.cgi?id=732668
-rw-r--r--giscanner/cachestore.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/giscanner/cachestore.py b/giscanner/cachestore.py
index bcac0784..0dbf1fb8 100644
--- a/giscanner/cachestore.py
+++ b/giscanner/cachestore.py
@@ -45,10 +45,7 @@ def _get_versionhash():
def _get_cachedir():
if 'GI_SCANNER_DISABLE_CACHE' in os.environ:
return None
- if os.name == 'nt' and 'MSYSTEM' not in os.environ:
- homedir = os.environ.get('HOMEPATH')
- else:
- homedir = os.environ.get('HOME')
+ homedir = os.path.expanduser('~')
if homedir is None:
return None
if not os.path.exists(homedir):