[glib] resources: compiler: Respect absolute paths



commit e3cc48f28998782da46292b53b5b540e82094d2a
Author: Christian Persch <chpe gnome org>
Date:   Thu Mar 22 14:01:40 2012 +0100

    resources: compiler: Respect absolute paths
    
    When a <file> already has an absolute path, use it directly instead of trying to
    locate it in the --sourcedir directories.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=672541

 gio/glib-compile-resources.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gio/glib-compile-resources.c b/gio/glib-compile-resources.c
index e352fc6..31e5624 100644
--- a/gio/glib-compile-resources.c
+++ b/gio/glib-compile-resources.c
@@ -184,6 +184,9 @@ find_file (const gchar *filename)
   gchar *real_file;
   gboolean exists;
 
+  if (g_path_is_absolute (filename))
+    return g_strdup (filename);
+
   /* search all the sourcedirs for the correct files in order */
   for (i = 0; sourcedirs[i] != NULL; i++)
     {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]