gvfs r1123 - in trunk: . client
- From: alexl svn gnome org
- To: svn-commits-list gnome org
- Subject: gvfs r1123 - in trunk: . client
- Date: Mon, 14 Jan 2008 14:56:09 +0000 (GMT)
Author: alexl
Date: Mon Jan 14 14:56:09 2008
New Revision: 1123
URL: http://svn.gnome.org/viewvc/gvfs?rev=1123&view=rev
Log:
2008-01-14 Alexander Larsson <alexl redhat com>
* client/gdaemonfile.c:
(match_prefix):
Handle root correctly in g_file_get_relative_path (#508719)
Modified:
trunk/ChangeLog
trunk/client/gdaemonfile.c
Modified: trunk/client/gdaemonfile.c
==============================================================================
--- trunk/client/gdaemonfile.c (original)
+++ trunk/client/gdaemonfile.c Mon Jan 14 14:56:09 2008
@@ -332,6 +332,14 @@
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 &&
+ prefix[prefix_len-1] == '/')
+ prefix_len--;
+
+
return path + prefix_len;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]