summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@redhat.com>2009-08-18 15:00:17 +0200
committerTomas Bzatek <tbzatek@redhat.com>2009-08-18 15:46:53 +0200
commit13ae4361636faf02d34c703986a470a6d2bae80c (patch)
treefe68734b737e20a268c65d52ef464733c243db41 /client
parent893a6ef066756ac5f996d7f518034b1b1901eaa5 (diff)
downloadgvfs-13ae4361636faf02d34c703986a470a6d2bae80c.tar.gz
Include mount prefix when constructing fuse path
On complex URIs like 'dav://server/gallery/w/TestAlbum', g_file_get_path () would return incomplete path without the middle '/gallery/w' part (mount prefix). This patch ensures full path to be returned. See bug 590862 for details.
Diffstat (limited to 'client')
-rw-r--r--client/gdaemonvfs.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/client/gdaemonvfs.c b/client/gdaemonvfs.c
index 5a138b36..03827271 100644
--- a/client/gdaemonvfs.c
+++ b/client/gdaemonvfs.c
@@ -386,7 +386,6 @@ convert_fuse_path (GVfs *vfs,
if (mount_info)
{
g_object_unref (file);
- /* TODO: Do we need to look at the prefix of the mount_spec? */
file = g_daemon_file_new (mount_info->mount_spec, mount_path);
g_free (mount_path);
g_mount_info_unref (mount_info);
@@ -993,6 +992,7 @@ _g_daemon_vfs_get_mount_info_by_fuse_sync (const char *fuse_path,
DBusMessageIter iter;
DBusError derror;
int len;
+ const char *mount_path_end;
info = lookup_mount_info_by_fuse_path_in_cache (fuse_path,
mount_path);
@@ -1031,9 +1031,12 @@ _g_daemon_vfs_get_mount_info_by_fuse_sync (const char *fuse_path,
{
len = strlen (info->fuse_mountpoint);
if (fuse_path[len] == 0)
- *mount_path = g_strdup ("/");
+ mount_path_end = "/";
else
- *mount_path = g_strdup (fuse_path + len);
+ mount_path_end = fuse_path + len;
+
+ *mount_path = g_build_filename (info->mount_spec->mount_prefix,
+ mount_path_end, NULL);
}
else
{