2008-01-14 Alexander Larsson <alexl@redhat.com>
* glocalfile.c:
(match_prefix):
Handle root correctly in g_file_get_relative_path (#508719)
svn path=/trunk/; revision=6305
+2008-01-14 Alexander Larsson <alexl@redhat.com>
+
+ * glocalfile.c:
+ (match_prefix):
+ Handle root correctly in g_file_get_relative_path (#508719)
+
2008-01-14 Alexander Larsson <alexl@redhat.com>
* gasyncresult.c:
prefix_len = strlen (prefix);
if (strncmp (path, prefix, prefix_len) != 0)
return NULL;
+
+ /* Handle the case where prefix is the root, so that
+ * the IS_DIR_SEPRARATOR check below works */
+ if (prefix_len > 0 &&
+ G_IS_DIR_SEPARATOR (prefix[prefix_len-1]))
+ prefix_len--;
+
return path + prefix_len;
}