summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorSergio Costas Rodriguez <sergio.costas@canonical.com>2022-08-31 15:20:20 +0200
committerOndrej Holy <oholy@redhat.com>2023-02-06 14:43:45 +0000
commita70e9fbdf34768985925b2b81661190a094e718b (patch)
tree5c54fc14b0b08627846cfe9b4389a2767d8c24e6 /client
parentc45294a2a7fb975740b44dde5b35f89e0a7cae76 (diff)
downloadgvfs-a70e9fbdf34768985925b2b81661190a094e718b.tar.gz
Fix string comparison
In several places, the code compares to strings by comparing their pointers instead of using g_strcmp0(). Although this seems to work, it is incorrect. This MR fixes it.
Diffstat (limited to 'client')
-rw-r--r--client/gdaemonvfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/gdaemonvfs.c b/client/gdaemonvfs.c
index bae13eb3..fc439014 100644
--- a/client/gdaemonvfs.c
+++ b/client/gdaemonvfs.c
@@ -308,7 +308,7 @@ g_daemon_vfs_init (GDaemonVfs *vfs)
vfs->wrapped_vfs = g_vfs_get_local ();
/* Use the old .gvfs location as fallback, not .cache/gvfs */
- if (g_get_user_runtime_dir() == g_get_user_cache_dir ())
+ if (g_strcmp0 (g_get_user_runtime_dir(), g_get_user_cache_dir ()) == 0)
file = g_build_filename (g_get_home_dir(), ".gvfs", NULL);
else
file = g_build_filename (g_get_user_runtime_dir(), "gvfs", NULL);