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 | |
parent | e24b3c04ea0efab476a6d83dfb8a14eea3bfd0ca (diff) | |
download | gvfs-d34436156fefcfe96cfbbd069721d68b0426bf49.tar.gz |
Revert "trash: Correctly determine fs type for paths with symlinks"
This reverts commit 6c0adcce5a3f5b784e198ce9cf2af6aaa540a264.
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | daemon/trashlib/trashwatcher.c | 17 |
2 files changed, 17 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 68ba662a..a21701da 100644 --- a/configure.ac +++ b/configure.ac @@ -61,7 +61,7 @@ GTK_DOC_CHECK DISTCHECK_CONFIGURE_FLAGS="--enable-gtk-doc" AC_SUBST(DISTCHECK_CONFIGURE_FLAGS) -PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.51.0 gobject-2.0 gmodule-no-export-2.0 gio-unix-2.0 gio-2.0]) +PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.49.4 gobject-2.0 gmodule-no-export-2.0 gio-unix-2.0 gio-2.0]) AC_ARG_WITH([dbus_service_dir], [AS_HELP_STRING([--with-dbus-service-dir=PATH],[choose directory for dbus service files, [default=PREFIX/share/dbus-1/services]])], 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 |