diff options
author | Razvan Chitu <razvan.ch95@gmail.com> | 2015-12-24 17:11:39 +0200 |
---|---|---|
committer | Carlos Soriano <csoriano@gnome.org> | 2015-12-24 16:28:36 +0100 |
commit | c9135ce6b6e7dd812106f0c7a5b305a12b57d0b0 (patch) | |
tree | 00a61e19d686167e8e5d796a29a007eab984b14a | |
parent | a3a7ac81b77fd65b8d3902aea8e00d2da4ad9f6c (diff) | |
download | nautilus-c9135ce6b6e7dd812106f0c7a5b305a12b57d0b0.tar.gz |
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
-rw-r--r-- | libnautilus-private/nautilus-file-operations.c | 2 |
1 files changed, 1 insertions, 1 deletions
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)); } |