diff options
author | Ondrej Holy <oholy@redhat.com> | 2016-10-25 09:00:05 +0200 |
---|---|---|
committer | Ondrej Holy <oholy@redhat.com> | 2016-12-12 14:28:57 +0100 |
commit | 63b45093ccbdba33586db740ff4f5da6506caff6 (patch) | |
tree | d6bd1342c621ad15c00799e98ff05b0eb73b847f /daemon | |
parent | aa61b05888f2e588acf8a1febb5dd20d8657d753 (diff) | |
download | gvfs-63b45093ccbdba33586db740ff4f5da6506caff6.tar.gz |
trash: Correctly determine fs type for paths with symlinks
If, for example, "/home" is a symlink to "/mnt/home", and the users's $HOME
is "/home/user", then the code won't correctly recognize unix mount, because
it just walks up the path removing trailing components. Consequently, "/" is
used to determine filesystem type instead of "/mnt/home". It will cause
problems if "/mnt/home" is e.g. NFS, which is handled differently than local
filesystem.
It uses newly added g_unix_mount_for. Bump GLib dependency accordingly.
https://bugzilla.gnome.org/show_bug.cgi?id=771431
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/trashlib/trashwatcher.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/daemon/trashlib/trashwatcher.c b/daemon/trashlib/trashwatcher.c index 64470236..6b455235 100644 --- a/daemon/trashlib/trashwatcher.c +++ b/daemon/trashlib/trashwatcher.c @@ -113,7 +113,7 @@ find_mount_entry_for_file (GFile *file) *slash = '\0'; - entry = g_unix_mount_at (pathname, NULL); + entry = g_unix_mount_for (pathname, NULL); } while (entry == NULL && pathname[1]); |