[gvfs] Revert "trash: Correctly determine fs type for paths with symlinks"
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] Revert "trash: Correctly determine fs type for paths with symlinks"
- Date: Mon, 24 Oct 2016 18:30:34 +0000 (UTC)
commit d34436156fefcfe96cfbbd069721d68b0426bf49
Author: Ondrej Holy <oholy redhat com>
Date: Mon Oct 24 20:20:38 2016 +0200
Revert "trash: Correctly determine fs type for paths with symlinks"
This reverts commit 6c0adcce5a3f5b784e198ce9cf2af6aaa540a264.
configure.ac | 2 +-
daemon/trashlib/trashwatcher.c | 17 ++++++++++++++++-
2 files changed, 17 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 68ba662..a21701d 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 5520eb5..f1196a3 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]