mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 23:13:40 +02:00
Canonicalize paths that start with more than two slashes.
2008-01-22 Alexander Larsson <alexl@redhat.com> * glocalfile.c: (canonicalize_filename): Canonicalize paths that start with more than two slashes. * tests/g-file.c: (compare_two_files): (test_g_file_new_for_path): Test the above svn path=/trunk/; revision=6353
This commit is contained in:
committed by
Alexander Larsson
parent
db5224fa85
commit
2544ae3cd6
@@ -83,7 +83,7 @@ compare_two_files (const gboolean use_uri, const char *path1, const char *path2)
|
||||
GFile *file1 = NULL;
|
||||
GFile *file2 = NULL;
|
||||
gboolean equal;
|
||||
|
||||
|
||||
if (use_uri)
|
||||
{
|
||||
file1 = g_file_new_for_uri (path1);
|
||||
@@ -120,7 +120,8 @@ test_g_file_new_for_path (void)
|
||||
{"/", TRUE, 0, "/somedir/../"},
|
||||
{"/", FALSE, 0, "/somedir/.../"},
|
||||
{"//tmp/dir1", TRUE, 0, "//tmp/dir1"},
|
||||
/* Should not fail: {"/tmp/dir1", TRUE, 0, "///tmp/dir1"}, */
|
||||
{"/tmp/dir1", TRUE, 0, "///tmp/dir1"},
|
||||
{"/tmp/dir1", TRUE, 0, "////tmp/dir1"},
|
||||
{"/tmp/dir1", TRUE, 0, "/tmp/./dir1"},
|
||||
{"/tmp/dir1", TRUE, 0, "/tmp//dir1"},
|
||||
{"/tmp/dir1", TRUE, 0, "/tmp///dir1///"},
|
||||
|
Reference in New Issue
Block a user