gvfs/gvfs-1.3.4-dont-strip-mount-prefix-for-local-paths.patch

45 lines
1.3 KiB
Diff
Raw Normal View History

From 3ba4f3e3deae84cbd5ffe8e7bfd2803d96e7e2e6 Mon Sep 17 00:00:00 2001
From: Tomas Bzatek <tbzatek@redhat.com>
Date: Wed, 5 Aug 2009 16:50:28 +0200
Subject: [PATCH] Don't strip mount prefix when returning local mapped path
On complex URIs like 'dav://server/gallery/w/TestAlbum',
g_file_get_path () would return malformed path with the middle
path '/gallery/w' stripped. This patch ensures full path to be
returned.
See bug #590862 for more details.
---
client/gdaemonfile.c | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)
diff --git a/client/gdaemonfile.c b/client/gdaemonfile.c
index 8e14929..be9baef 100644
--- a/client/gdaemonfile.c
+++ b/client/gdaemonfile.c
@@ -167,7 +167,6 @@ g_daemon_file_get_path (GFile *file)
{
GDaemonFile *daemon_file = G_DAEMON_FILE (file);
GMountInfo *mount_info;
- const char *rel_path;
char *path;
/* This is a sync i/o call, which is a bit unfortunate, as
@@ -185,12 +184,7 @@ g_daemon_file_get_path (GFile *file)
path = NULL;
if (mount_info->fuse_mountpoint)
- {
- rel_path = daemon_file->path +
- strlen (mount_info->mount_spec->mount_prefix);
-
- path = g_build_filename (mount_info->fuse_mountpoint, rel_path, NULL);
- }
+ path = g_build_filename (mount_info->fuse_mountpoint, daemon_file->path, NULL);
g_mount_info_unref (mount_info);
--
1.6.4