diff --git a/girparser.c b/girparser.c index 2e8890eae..0a06aa089 100644 --- a/girparser.c +++ b/girparser.c @@ -27,6 +27,7 @@ #include "girmodule.h" #include "girnode.h" #include "gtypelib.h" +#include "config.h" struct _GIrParser { @@ -245,13 +246,18 @@ locate_gir (GIrParser *parser, } for (dir = datadirs; *dir; dir++) { - path = g_build_filename (*dir, "gir-1.0", girname, NULL); + path = g_build_filename (*dir, GIR_SUFFIX, girname, NULL); if (g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR)) return path; g_free (path); path = NULL; } - return path; + + path = g_build_filename (GIR_DIR, girname, NULL); + if (g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR)) + return path; + g_free (path); + return NULL; } #define MISSING_ATTRIBUTE(ctx,error,element,attribute) \