From 3701b320a53de2920ffb96982b40d8204d95d504 Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Wed, 30 Jul 2014 14:07:36 +0800 Subject: 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 --- giscanner/cachestore.py | 5 +---- 1 file changed, 1 insertion(+), 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): -- cgit v1.2.1