[gvfs] Keep using ~/.gvfs as fallback
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] Keep using ~/.gvfs as fallback
- Date: Thu, 15 Mar 2012 20:37:37 +0000 (UTC)
commit 09dfd003a4825eb8667ba521fae64f12bd551bce
Author: Alexander Larsson <alexl redhat com>
Date: Thu Mar 15 21:35:22 2012 +0100
Keep using ~/.gvfs as fallback
If runtime dir is not specifically set we don't fall back to
~/.cache/gvfs, as that unnecessarily invalidates all existing
documentation and scripts using ~/.gvfs.
However, if it is set, we still use it.
client/gdaemonvfs.c | 6 +++++-
daemon/main.c | 6 +++++-
daemon/mount.c | 6 +++++-
3 files changed, 15 insertions(+), 3 deletions(-)
---
diff --git a/client/gdaemonvfs.c b/client/gdaemonvfs.c
index bb75da5..e62da9b 100644
--- a/client/gdaemonvfs.c
+++ b/client/gdaemonvfs.c
@@ -325,7 +325,11 @@ g_daemon_vfs_init (GDaemonVfs *vfs)
vfs->wrapped_vfs = g_vfs_get_local ();
- file = g_build_filename (g_get_user_runtime_dir(), "gvfs", NULL);
+ /* Use the old .gvfs location as fallback, not .cache/gvfs */
+ if (g_get_user_runtime_dir() == g_get_user_cache_dir ())
+ file = g_build_filename (g_get_home_dir(), ".gvfs", NULL);
+ else
+ file = g_build_filename (g_get_user_runtime_dir(), "gvfs", NULL);
vfs->fuse_root = g_vfs_get_file_for_path (vfs->wrapped_vfs, file);
g_free (file);
diff --git a/daemon/main.c b/daemon/main.c
index d83aaed..7fd689c 100644
--- a/daemon/main.c
+++ b/daemon/main.c
@@ -106,7 +106,11 @@ main (int argc, char *argv[])
char *fuse_path;
char *argv2[4];
- fuse_path = g_build_filename (g_get_user_runtime_dir (), "gvfs", NULL);
+ /* Use the old .gvfs location as fallback, not .cache/gvfs */
+ if (g_get_user_runtime_dir() == g_get_user_cache_dir ())
+ fuse_path = g_build_filename (g_get_home_dir(), ".gvfs", NULL);
+ else
+ fuse_path = g_build_filename (g_get_user_runtime_dir (), "gvfs", NULL);
if (!g_file_test (fuse_path, G_FILE_TEST_EXISTS))
g_mkdir (fuse_path, 0700);
diff --git a/daemon/mount.c b/daemon/mount.c
index c2b7f8f..40d9aea 100644
--- a/daemon/mount.c
+++ b/daemon/mount.c
@@ -735,7 +735,11 @@ register_mount (DBusConnection *connection,
/* Keep in sync with fuse daemon */
fs_name = g_uri_escape_string (mount->stable_name, "+ #$ , ", TRUE);
- mount->fuse_mountpoint = g_build_filename (g_get_user_runtime_dir(), "gvfs", fs_name, NULL);
+ /* 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);
+ else
+ mount->fuse_mountpoint = g_build_filename (g_get_user_runtime_dir(), "gvfs", fs_name, NULL);
}
mounts = g_list_prepend (mounts, mount);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]