From a70e9fbdf34768985925b2b81661190a094e718b Mon Sep 17 00:00:00 2001 From: Sergio Costas Rodriguez Date: Wed, 31 Aug 2022 15:20:20 +0200 Subject: 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. --- client/gdaemonvfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'client') 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); -- cgit v1.2.1