Search provided include dirs before the default directories.

2008-11-11  Owen Taylor  <otaylor@redhat.com>

        * girepository/girparser.c: Search provided include dirs before
        the default directories.

svn path=/trunk/; revision=885
This commit is contained in:
Owen Taylor 2008-11-11 15:25:59 +00:00 committed by Owen Taylor
parent ac8db19d3f
commit ecc78cf338

View File

@ -198,14 +198,6 @@ locate_gir (const char *name, const char *version, const char * const* extra_pat
girname = g_strdup_printf ("%s-%s.gir", name, version);
for (dir = datadirs; *dir; dir++)
{
path = g_build_filename (*dir, "gir", girname, NULL);
if (g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
return path;
g_free (path);
path = NULL;
}
if (extra_paths != NULL)
{
for (dir = extra_paths; *dir; dir++)
@ -217,6 +209,14 @@ locate_gir (const char *name, const char *version, const char * const* extra_pat
path = NULL;
}
}
for (dir = datadirs; *dir; dir++)
{
path = g_build_filename (*dir, "gir", girname, NULL);
if (g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
return path;
g_free (path);
path = NULL;
}
g_free (girname);
return path;
}