[gvfs/gnome-3-24] proxy: Fix shadow mount handling for equal paths
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs/gnome-3-24] proxy: Fix shadow mount handling for equal paths
- Date: Thu, 24 Aug 2017 09:31:37 +0000 (UTC)
commit 3e995d2200bf733611fed64bd1be23d9f4a7a85c
Author: Ondrej Holy <oholy redhat com>
Date: Mon Aug 21 14:33:12 2017 +0200
proxy: Fix shadow mount handling for equal paths
Automatic shadow mount handling in some cases works currently only thanks
to the bug in g_daemon_file_prefix_matches implementation, which I am going
to fix. The problematic case is when activation_root is equal to mount_root
(e.g. Nextcloud integration). The bug in _prefix_matches causes that it
succeeds also if the paths are equal, but this is wrong as per the docs.
Let's use also g_file_equal when looking for shadow mounts in order to fix
this issue.
https://bugzilla.gnome.org/show_bug.cgi?id=786217
monitor/proxy/gproxyvolume.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/monitor/proxy/gproxyvolume.c b/monitor/proxy/gproxyvolume.c
index fc24f15..c76ec55 100644
--- a/monitor/proxy/gproxyvolume.c
+++ b/monitor/proxy/gproxyvolume.c
@@ -265,7 +265,8 @@ update_shadow_mount (GProxyVolume *volume)
continue;
mount_root = g_mount_get_root (mount);
- prefix_matches = g_file_has_prefix (activation_root, mount_root);
+ prefix_matches = (g_file_has_prefix (activation_root, mount_root) ||
+ g_file_equal (activation_root, mount_root));
g_object_unref (mount_root);
if (prefix_matches)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]