mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-27 12:42:10 +01:00
GLocalFile: canonicalize the initial directory separator
GLocalFile was (in certain situations) translating a path like "/foo/bar/baz" to "/foo\bar\baz" on win32. Fix it to make sure the initial directory separator gets canonicalized too. Fixes gio/tests/g-icon on win32. https://bugzilla.gnome.org/show_bug.cgi?id=688109
This commit is contained in:
parent
f80d8f1e4d
commit
468a166711
@ -229,6 +229,11 @@ canonicalize_filename (const char *filename)
|
||||
start -= i;
|
||||
memmove (start, start+i, strlen (start+i)+1);
|
||||
}
|
||||
|
||||
/* Make sure we're using the canonical dir separator */
|
||||
p++;
|
||||
while (p < start && G_IS_DIR_SEPARATOR (*p))
|
||||
*p++ = G_DIR_SEPARATOR;
|
||||
|
||||
p = start;
|
||||
while (*p != 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user