diff options
author | Ondrej Holy <oholy@redhat.com> | 2016-10-24 20:20:38 +0200 |
---|---|---|
committer | Ondrej Holy <oholy@redhat.com> | 2016-10-24 20:20:56 +0200 |
commit | d34436156fefcfe96cfbbd069721d68b0426bf49 (patch) | |
tree | 21b1c53518fc42b8ebfce0576769219f4e9ad43f /daemon/trashlib | |
parent | e24b3c04ea0efab476a6d83dfb8a14eea3bfd0ca (diff) | |
download | gvfs-d34436156fefcfe96cfbbd069721d68b0426bf49.tar.gz |
Revert "trash: Correctly determine fs type for paths with symlinks"
This reverts commit 6c0adcce5a3f5b784e198ce9cf2af6aaa540a264.
Diffstat (limited to 'daemon/trashlib')
-rw-r--r-- | daemon/trashlib/trashwatcher.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/daemon/trashlib/trashwatcher.c b/daemon/trashlib/trashwatcher.c index 5520eb57..f1196a3f 100644 --- a/daemon/trashlib/trashwatcher.c +++ b/daemon/trashlib/trashwatcher.c @@ -95,7 +95,22 @@ find_mount_entry_for_file (GFile *file) char *pathname; pathname = g_file_get_path (file); - entry = g_unix_mount_for (pathname, NULL); + do + { + char *slash; + + slash = strrchr (pathname, '/'); + + /* leave the leading '/' in place */ + if (slash == pathname) + slash++; + + *slash = '\0'; + + entry = g_unix_mount_at (pathname, NULL); + } + while (entry == NULL && pathname[1]); + g_free (pathname); /* if the GUnixMount stuff is gummed up, this might fail. we can't |