diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2014-07-30 14:07:36 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2014-08-01 15:26:11 +0800 |
commit | 3701b320a53de2920ffb96982b40d8204d95d504 (patch) | |
tree | 0272232d5ad9508527c9e9d21470d198a504df82 /giscanner | |
parent | ac9379afa6192b6606c18ff60874908de3d8fe8e (diff) | |
download | gobject-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
Diffstat (limited to 'giscanner')
-rw-r--r-- | giscanner/cachestore.py | 5 |
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): |