[gnome-settings-daemon/gnome-3-12] housekeeping: fix deletion of files in the trash
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/gnome-3-12] housekeeping: fix deletion of files in the trash
- Date: Wed, 23 Jul 2014 03:03:58 +0000 (UTC)
commit 80264c2801378fc65868c38e0ce73fdc060b1c67
Author: Cosimo Cecchi <cosimo endlessm com>
Date: Fri Jul 11 18:15:10 2014 -0700
housekeeping: fix deletion of files in the trash
Fixes a regression from dd2477bf74510237310d41974ba3e342e6c95da1 where
regular files would never get deleted from the trash.
https://bugzilla.gnome.org/show_bug.cgi?id=733419
plugins/housekeeping/gsd-disk-space.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/plugins/housekeeping/gsd-disk-space.c b/plugins/housekeeping/gsd-disk-space.c
index 383a83d..117c413 100644
--- a/plugins/housekeeping/gsd-disk-space.c
+++ b/plugins/housekeeping/gsd-disk-space.c
@@ -434,7 +434,14 @@ delete_subdir_check_symlink (GObject *source,
type = g_file_info_get_file_type (info);
g_object_unref (info);
- if (type == G_FILE_TYPE_DIRECTORY) {
+ if (type == G_FILE_TYPE_SYMBOLIC_LINK) {
+ if (should_purge_file (data->file, data->cancellable, data->old)) {
+ g_debug ("Purging %s leaf node", data->name);
+ if (!data->dry_run) {
+ g_file_delete (data->file, data->cancellable, NULL);
+ }
+ }
+ } else {
g_file_enumerate_children_async (data->file,
G_FILE_ATTRIBUTE_STANDARD_NAME ","
G_FILE_ATTRIBUTE_STANDARD_TYPE,
@@ -443,13 +450,6 @@ delete_subdir_check_symlink (GObject *source,
data->cancellable,
delete_subdir,
delete_data_ref (data));
- } else if (type == G_FILE_TYPE_SYMBOLIC_LINK) {
- if (should_purge_file (data->file, data->cancellable, data->old)) {
- g_debug ("Purging %s leaf node", data->name);
- if (!data->dry_run) {
- g_file_delete (data->file, data->cancellable, NULL);
- }
- }
}
delete_data_unref (data);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]