diff options
author | Philip Withnall <philip@tecnocode.co.uk> | 2018-06-07 16:42:57 +0000 |
---|---|---|
committer | Philip Withnall <philip@tecnocode.co.uk> | 2018-06-07 16:42:57 +0000 |
commit | da3daf2803daa2ed1f8f7f660c4f3bdc3a35d7e2 (patch) | |
tree | 6e1bf32e1177a13e0eb4d217505a74e9d4fa37ac /gio/glocalfile.c | |
parent | b04142a24f8afdafd9717f0a543cb3902452cf05 (diff) | |
download | glib-da3daf2803daa2ed1f8f7f660c4f3bdc3a35d7e2.tar.gz |
Revert "Merge branch 'wip/oholy/trashing-locations' into 'master'"
This reverts merge request !49
Diffstat (limited to 'gio/glocalfile.c')
-rw-r--r-- | gio/glocalfile.c | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/gio/glocalfile.c b/gio/glocalfile.c index aff15a982..3cd0137d6 100644 --- a/gio/glocalfile.c +++ b/gio/glocalfile.c @@ -1769,7 +1769,6 @@ _g_local_file_has_trash_dir (const char *dirname, dev_t dir_dev) char uid_str[32]; GStatBuf global_stat, trash_stat; gboolean res; - GUnixMountEntry *mount; if (g_once_init_enter (&home_dev_set)) { @@ -1788,16 +1787,6 @@ _g_local_file_has_trash_dir (const char *dirname, dev_t dir_dev) if (topdir == NULL) return FALSE; - mount = g_unix_mount_at (topdir, NULL); - if (mount == NULL || g_unix_mount_is_system_internal (mount)) - { - g_clear_pointer (&mount, g_unix_mount_free); - - return FALSE; - } - - g_clear_pointer (&mount, g_unix_mount_free); - globaldir = g_build_filename (topdir, ".Trash", NULL); if (g_lstat (globaldir, &global_stat) == 0 && S_ISDIR (global_stat.st_mode) && @@ -1941,7 +1930,6 @@ g_local_file_trash (GFile *file, { uid_t uid; char uid_str[32]; - GUnixMountEntry *mount; uid = geteuid (); g_snprintf (uid_str, sizeof (uid_str), "%lu", (unsigned long)uid); @@ -1954,21 +1942,7 @@ g_local_file_trash (GFile *file, file, G_IO_ERROR_NOT_SUPPORTED); return FALSE; } - - mount = g_unix_mount_at (topdir, NULL); - if (mount == NULL || g_unix_mount_is_system_internal (mount)) - { - g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, - _("Trashing on system internal mounts is not supported")); - - g_clear_pointer (&mount, g_unix_mount_free); - g_free (topdir); - - return FALSE; - } - - g_clear_pointer (&mount, g_unix_mount_free); - + /* Try looking for global trash dir $topdir/.Trash/$uid */ globaldir = g_build_filename (topdir, ".Trash", NULL); if (g_lstat (globaldir, &global_stat) == 0 && |