gicon: make g_icon_new_for_string() recognize win32 paths
authorDan Winship <danw@gnome.org>
Fri, 3 Feb 2012 17:42:10 +0000 (12:42 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 6 Aug 2012 15:27:39 +0000 (11:27 -0400)
(but for compatibility, make it still recognize unix paths on win32
too)

https://bugzilla.gnome.org/show_bug.cgi?id=669331

gio/gicon.c

index df44bb0..d526b2e 100644 (file)
@@ -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);