summaryrefslogtreecommitdiff
path: root/daemon/main.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2012-03-15 21:35:22 +0100
committerAlexander Larsson <alexl@redhat.com>2012-03-15 21:35:22 +0100
commit09dfd003a4825eb8667ba521fae64f12bd551bce (patch)
tree9609664d7debcff9d15404c9442e01cfe1b06fe4 /daemon/main.c
parentbbb61d820ea319b6468e6b78c0b2f007c0338881 (diff)
downloadgvfs-09dfd003a4825eb8667ba521fae64f12bd551bce.tar.gz
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.
Diffstat (limited to 'daemon/main.c')
-rw-r--r--daemon/main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/daemon/main.c b/daemon/main.c
index d83aaedc..7fd689ca 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);