From c9135ce6b6e7dd812106f0c7a5b305a12b57d0b0 Mon Sep 17 00:00:00 2001 From: Razvan Chitu Date: Thu, 24 Dec 2015 17:11:39 +0200 Subject: file-operations: always pop undo manager flag Nautilus undo manager reuses undo information based on a flag that is pushed when an undo operation begins and popped during the operation itself. In the case of trashing / deleting files, the flag was not popped in some situations, which caused the next operations to not be undoable. Flip operands of a logical operator so the flag is always popped, avoiding issues caused by lazy evaluation. A better solution would be to always update the flag internally in the manager, and only peek its value externally. https://bugzilla.gnome.org/show_bug.cgi?id=759850 --- libnautilus-private/nautilus-file-operations.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libnautilus-private/nautilus-file-operations.c b/libnautilus-private/nautilus-file-operations.c index 376ef7ecb..c48bbb3d5 100644 --- a/libnautilus-private/nautilus-file-operations.c +++ b/libnautilus-private/nautilus-file-operations.c @@ -2231,7 +2231,7 @@ trash_or_delete_internal (GList *files, inhibit_power_manager ((CommonJob *)job, _("Deleting Files")); } - if (try_trash && !nautilus_file_undo_manager_pop_flag ()) { + if (!nautilus_file_undo_manager_pop_flag () && try_trash) { job->common.undo_info = nautilus_file_undo_info_trash_new (g_list_length (files)); } -- cgit v1.2.1