diff options
author | Ondrej Holy <oholy@redhat.com> | 2016-09-26 15:12:47 +0200 |
---|---|---|
committer | Ondrej Holy <oholy@redhat.com> | 2016-10-10 14:24:46 +0200 |
commit | 4d2562b33c07de1b817da8ba44afe07cac5e66c8 (patch) | |
tree | bad0a64360ff86e197b2e87dcb28e922df5bd5a2 | |
parent | 3676a6b9168e56d8773da80789e440c47f4a0c4a (diff) | |
download | gvfs-4d2562b33c07de1b817da8ba44afe07cac5e66c8.tar.gz |
udisks2: Use device path to match mount points also
Mount path is used to match mount points currently, however device
path should be used also in order to be sure it is really corresponding
mount point. Same mount path can be used for multiple mount entries
(it is also used e.g. for autofs).
$ mount | grep /media/test
systemd-1 on /media/test type autofs ...
localhost:/home/oholy on /media/test type nfs4 ...
https://bugzilla.gnome.org/show_bug.cgi?id=771740
-rw-r--r-- | monitor/udisks2/gvfsudisks2volumemonitor.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/monitor/udisks2/gvfsudisks2volumemonitor.c b/monitor/udisks2/gvfsudisks2volumemonitor.c index eee938c5..af1d51ac 100644 --- a/monitor/udisks2/gvfsudisks2volumemonitor.c +++ b/monitor/udisks2/gvfsudisks2volumemonitor.c @@ -583,7 +583,9 @@ get_mount_point_for_mount (GUnixMountEntry *mount_entry) { GUnixMountPoint *mount_point = l->data; if (g_strcmp0 (g_unix_mount_get_mount_path (mount_entry), - g_unix_mount_point_get_mount_path (mount_point)) == 0) + g_unix_mount_point_get_mount_path (mount_point)) == 0 && + g_strcmp0 (g_unix_mount_get_device_path (mount_entry), + g_unix_mount_point_get_device_path (mount_point)) == 0) { ret = mount_point; goto out; |