mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36:14 +01:00
Search XDG_DATA_HOME/gir-1.0 for GIR XML too
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>
This commit is contained in:
parent
4758e1ee19
commit
d3d6fd6809
@ -327,6 +327,12 @@ locate_gir (GIrParser *parser,
|
||||
}
|
||||
}
|
||||
|
||||
path = g_build_filename (g_get_user_data_dir (), GIR_SUFFIX, girname, NULL);
|
||||
g_debug ("Trying %s from user data dir", path);
|
||||
if (g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
|
||||
return g_steal_pointer (&path);
|
||||
g_clear_pointer (&path, g_free);
|
||||
|
||||
for (dir = datadirs; *dir; dir++)
|
||||
{
|
||||
path = g_build_filename (*dir, GIR_SUFFIX, girname, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user