gobject-introspection.setupHook: limit XDG_DATA_DIRS

The setup hook was adding share directory to XDG_DATA_DIRS variable whenever
it existed, even when gir-1.0 subdirectory did not.
This commit is contained in:
Jan Tojnar 2019-01-19 14:17:16 +01:00
parent 492f3c3faa
commit b766ec29a7
No known key found for this signature in database
GPG key ID: 7FAB2A15F7A607A4

View file

@ -4,8 +4,8 @@ make_gobject_introspection_find_gir_files() {
addToSearchPath GI_TYPELIB_PATH $1/lib/girepository-1.0
fi
# XDG_DATA_DIRS: required for .gir files?
if [ -d "$1/share" ]; then
# XDG_DATA_DIRS: required for finding .gir files
if [ -d "$1/share/gir-1.0" ]; then
addToSearchPath XDG_DATA_DIRS $1/share
fi
}