[glib] gicon: make g_icon_new_for_string() recognize win32 paths



commit 291853bea3881a7eeb0f2c56946d3a1c0ef38c95
Author: Dan Winship <danw gnome org>
Date:   Fri Feb 3 12:42:10 2012 -0500

    gicon: make g_icon_new_for_string() recognize win32 paths
    
    (but for compatibility, make it still recognize unix paths on win32
    too)
    
    https://bugzilla.gnome.org/show_bug.cgi?id=669331

 gio/gicon.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gio/gicon.c b/gio/gicon.c
index df44bb0..d526b2e 100644
--- a/gio/gicon.c
+++ b/gio/gicon.c
@@ -433,7 +433,7 @@ g_icon_new_for_string (const gchar   *str,
 
       /* handle special GFileIcon and GThemedIcon cases */
       scheme = g_uri_parse_scheme (str);
-      if (scheme != NULL || str[0] == '/')
+      if (scheme != NULL || str[0] == '/' || str[0] == G_DIR_SEPARATOR)
         {
           GFile *location;
           location = g_file_new_for_commandline_arg (str);



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