mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-27 17:52:58 +02:00
glib-compile-resources: correct resource compiler dependency for generated files
Don't require that files can be resolved when generating dependencies. Original patch by Garret Regier. https://bugzilla.gnome.org/show_bug.cgi?id=673101
This commit is contained in:
committed by
Colin Walters
parent
05d429af9d
commit
5411a187a3
@@ -214,7 +214,8 @@ end_element (GMarkupParseContext *context,
|
||||
|
||||
else if (strcmp (element_name, "file") == 0)
|
||||
{
|
||||
gchar *file, *real_file;
|
||||
gchar *file;
|
||||
gchar *real_file = NULL;
|
||||
gchar *key;
|
||||
FileData *data = NULL;
|
||||
char *tmp_file = NULL;
|
||||
@@ -241,7 +242,7 @@ end_element (GMarkupParseContext *context,
|
||||
if (sourcedirs != NULL)
|
||||
{
|
||||
real_file = find_file (file);
|
||||
if (real_file == NULL)
|
||||
if (real_file == NULL && state->collect_data)
|
||||
{
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||
_("Failed to locate '%s' in any source directory"), file);
|
||||
@@ -252,15 +253,17 @@ end_element (GMarkupParseContext *context,
|
||||
{
|
||||
gboolean exists;
|
||||
exists = g_file_test (file, G_FILE_TEST_EXISTS);
|
||||
if (!exists)
|
||||
if (!exists && state->collect_data)
|
||||
{
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||
_("Failed to locate '%s' in current directory"), file);
|
||||
return;
|
||||
}
|
||||
real_file = g_strdup (file);
|
||||
}
|
||||
|
||||
if (real_file == NULL)
|
||||
real_file = g_strdup (file);
|
||||
|
||||
data = g_new0 (FileData, 1);
|
||||
data->filename = g_strdup (real_file);
|
||||
if (!state->collect_data)
|
||||
|
Reference in New Issue
Block a user