summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Kellner <gicmo@gnome.org>2011-05-16 14:17:28 +0200
committerChristian Kellner <gicmo@gnome.org>2011-05-16 14:21:42 +0200
commitd919fe04ded8224e288993e76b251e596cf94fab (patch)
treec12a62583021cf3dd859b16bdf78c09ef5386722
parent6e2f679f73db38f55073119989de9b33ba265540 (diff)
downloadgvfs-d919fe04ded8224e288993e76b251e596cf94fab.tar.gz
dav: Unescape the path when setting the mount_prefix of the GMountSpec
As of commit 6e2f67 we escape the path of the mount_base. Later when we set the mount_prefix of the backend's mount_spec we do use the mount_base for this. We therefore have to unescape the path again because otherwise comparing paths won't work in the client.
-rw-r--r--daemon/gvfsbackenddav.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/daemon/gvfsbackenddav.c b/daemon/gvfsbackenddav.c
index 0d15e7ac..5fc3c9f3 100644
--- a/daemon/gvfsbackenddav.c
+++ b/daemon/gvfsbackenddav.c
@@ -1513,6 +1513,7 @@ g_mount_spec_from_dav_uri (GVfsBackendDav *dav_backend,
{
GMountSpec *spec;
const char *ssl;
+ char *local_path;
#ifdef HAVE_AVAHI
if (dav_backend->resolver != NULL)
@@ -1555,7 +1556,11 @@ g_mount_spec_from_dav_uri (GVfsBackendDav *dav_backend,
g_free (port);
}
- g_mount_spec_set_mount_prefix (spec, uri->path);
+ /* There must not be any illegal characters in the
+ URL at this point */
+ local_path = g_uri_unescape_string (uri->path, "/");
+ g_mount_spec_set_mount_prefix (spec, local_path);
+ g_free (local_path);
return spec;
}