diff options
author | Sergio Costas Rodriguez <sergio.costas@canonical.com> | 2022-08-31 15:20:20 +0200 |
---|---|---|
committer | Ondrej Holy <oholy@redhat.com> | 2023-02-06 14:43:45 +0000 |
commit | a70e9fbdf34768985925b2b81661190a094e718b (patch) | |
tree | 5c54fc14b0b08627846cfe9b4389a2767d8c24e6 /daemon/mount.c | |
parent | c45294a2a7fb975740b44dde5b35f89e0a7cae76 (diff) | |
download | gvfs-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 'daemon/mount.c')
-rw-r--r-- | daemon/mount.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/daemon/mount.c b/daemon/mount.c index 41a4b0b7..df9c7afa 100644 --- a/daemon/mount.c +++ b/daemon/mount.c @@ -739,7 +739,7 @@ handle_register_mount (GVfsDBusMountTracker *object, if (arg_user_visible) { /* 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) 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", mount->stable_name, NULL); |