mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-27 20:52:12 +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
@ -230,6 +230,11 @@ canonicalize_filename (const char *filename)
|
|||||||
memmove (start, start+i, strlen (start+i)+1);
|
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;
|
p = start;
|
||||||
while (*p != 0)
|
while (*p != 0)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user