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
This commit is contained in:
Dan Winship 2012-02-03 12:42:10 -05:00 committed by Matthias Clasen
parent 26f1e0938e
commit 291853bea3

View 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);