[gvfs] Include mount prefix when constructing fuse path
- From: Tomas Bzatek <tbzatek src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gvfs] Include mount prefix when constructing fuse path
- Date: Tue, 18 Aug 2009 13:51:12 +0000 (UTC)
commit 13ae4361636faf02d34c703986a470a6d2bae80c
Author: Tomas Bzatek <tbzatek redhat com>
Date: Tue Aug 18 15:00:17 2009 +0200
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.
client/gdaemonvfs.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/client/gdaemonvfs.c b/client/gdaemonvfs.c
index 5a138b3..0382727 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
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]