diff options
author | Simon McVittie <smcv@debian.org> | 2021-02-10 12:07:56 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2023-03-14 12:37:48 +0000 |
commit | 05a3364e14965eeab04da8fd5e57bb883c162217 (patch) | |
tree | 92f95400669e938edb2fe8f60663cdc8716a56a7 /giscanner/transformer.py | |
parent | a15ae089e49c110a4d4e19fac0ab9d135a119e5f (diff) | |
download | gobject-introspection-wip/smcv/search-paths.tar.gz |
Search XDG_DATA_HOME/gir-1.0 for GIR XML toowip/smcv/search-paths
For completeness. There probably won't be any, but the XDG base directory
specification is most useful if it's consistently followed everywhere,
and the specification says to look in XDG_DATA_HOME before XDG_DATA_DIRS.
Signed-off-by: Simon McVittie <smcv@debian.org>
Diffstat (limited to 'giscanner/transformer.py')
-rw-r--r-- | giscanner/transformer.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/giscanner/transformer.py b/giscanner/transformer.py index 545ce6cc..88d429a6 100644 --- a/giscanner/transformer.py +++ b/giscanner/transformer.py @@ -185,6 +185,9 @@ None.""" from_env = os.getenv('GI_GIR_PATH', '') if from_env: searchdirs.extend(from_env.split(os.pathsep)) + user_data = utils.get_user_data_dir() + if user_data is not None: + searchdirs.append(os.path.join(user_data, 'gir-1.0')) for path in utils.get_system_data_dirs(): searchdirs.append(os.path.join(path, 'gir-1.0')) searchdirs.append(GIR_DIR) |