[gvfs] Don't use the display name to make the unique mount point
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] Don't use the display name to make the unique mount point
- Date: Thu, 30 Aug 2012 18:54:34 +0000 (UTC)
commit 3ef1deba4a05597a8b2bba6222ce9d94b02d6312
Author: William Jon McCann <jmccann redhat com>
Date: Thu Aug 30 14:38:37 2012 -0400
Don't use the display name to make the unique mount point
https://bugzilla.gnome.org/show_bug.cgi?id=682878
client/gvfsfusedaemon.c | 10 +---------
daemon/gvfsbackend.c | 9 +++------
daemon/mount.c | 9 ++-------
3 files changed, 6 insertions(+), 22 deletions(-)
---
diff --git a/client/gvfsfusedaemon.c b/client/gvfsfusedaemon.c
index 675af27..dd96732 100644
--- a/client/gvfsfusedaemon.c
+++ b/client/gvfsfusedaemon.c
@@ -379,15 +379,7 @@ mount_record_new (GMount *mount)
mount_record = g_new (MountRecord, 1);
mount_record->root = g_mount_get_root (mount);
- name = g_object_get_data (G_OBJECT (mount), "g-stable-name");
- if (name != NULL && *name != 0)
- name = g_strdup (name);
- else
- name = g_mount_get_name (mount);
-
- /* Keep in sync with gvfs daemon mount tracker */
- mount_record->name = g_uri_escape_string (name, "+ #$ , ", TRUE);
- g_free (name);
+ mount_record->name = g_object_get_data (G_OBJECT (mount), "g-stable-name");
mount_record->creation_time = time (NULL);
return mount_record;
diff --git a/daemon/gvfsbackend.c b/daemon/gvfsbackend.c
index dbe44a0..b6053a2 100644
--- a/daemon/gvfsbackend.c
+++ b/daemon/gvfsbackend.c
@@ -657,7 +657,7 @@ register_mount_got_proxy_cb (GObject *source_object,
GError *error = NULL;
GSimpleAsyncResult *result;
GVfsBackend *backend;
- const char *stable_name;
+ char *stable_name;
char *x_content_types_string;
char *icon_str;
char *symbolic_icon_str;
@@ -693,11 +693,7 @@ register_mount_got_proxy_cb (GObject *source_object,
else
symbolic_icon_str = g_strdup ("");
- if (backend->priv->stable_name != NULL &&
- *backend->priv->stable_name != 0)
- stable_name = backend->priv->stable_name;
- else
- stable_name = backend->priv->display_name;
+ stable_name = g_mount_spec_to_string (backend->priv->mount_spec);
gvfs_dbus_mount_tracker_call_register_mount (proxy,
backend->priv->object_path,
@@ -713,6 +709,7 @@ register_mount_got_proxy_cb (GObject *source_object,
NULL,
data->callback, data->callback_data);
+ g_free (stable_name);
g_free (x_content_types_string);
g_free (icon_str);
g_free (symbolic_icon_str);
diff --git a/daemon/mount.c b/daemon/mount.c
index edbba5a..6b787ef 100644
--- a/daemon/mount.c
+++ b/daemon/mount.c
@@ -648,16 +648,11 @@ handle_register_mount (GVfsDBusMountTracker *object,
if (arg_user_visible)
{
- char *fs_name;
-
- /* Keep in sync with fuse daemon */
- fs_name = g_uri_escape_string (mount->stable_name, "+ #$ , ", TRUE);
-
/* Use the old .gvfs location as fallback, not .cache/gvfs */
if (g_get_user_runtime_dir() == g_get_user_cache_dir ())
- mount->fuse_mountpoint = g_build_filename (g_get_home_dir(), ".gvfs", fs_name, NULL);
+ mount->fuse_mountpoint = g_build_filename (g_get_home_dir(), ".gvfs", mount->stable_name, NULL);
else
- mount->fuse_mountpoint = g_build_filename (g_get_user_runtime_dir(), "gvfs", fs_name, NULL);
+ mount->fuse_mountpoint = g_build_filename (g_get_user_runtime_dir(), "gvfs", mount->stable_name, NULL);
}
mounts = g_list_prepend (mounts, mount);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]