After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 758579 - Undo/Redo operation forget on copy of directories
Undo/Redo operation forget on copy of directories
Status: RESOLVED INCOMPLETE
Product: nautilus
Classification: Core
Component: Cut Copy Paste Undo
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-11-24 09:06 UTC by prepangolin
Modified: 2016-01-08 08:23 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Worked on Nautilus 3.4.2, Need for review (1.12 KB, patch)
2016-01-06 01:02 UTC, prepangolin
needs-work Details | Review

Description prepangolin 2015-11-24 09:06:40 UTC
Recently, I found the one bug releated with Undo/Redo feature of Nautilus.

How to reproduce the bug:
Let's say, there are three directories called a, b, c under the same directory.
Op 1. Copy a to b
Op 2. Under the Edit menu, do "Undo Copy".
Op 3. Copy c to b
4. Under the Edit menu, You can see "Redo copy" for Op 1 is enabled

Excepted result:
I think "Undo Copy" for Op 3 should be enabled under the Edit menu.
Hope to any direction to solve this issue.
Comment 1 prepangolin 2015-12-26 14:26:31 UTC
I fixed this issue.
Let me know where can i upload the patch.
Comment 2 Carlos Soriano 2016-01-04 11:47:40 UTC
Hey,

Thanks for it. Upload the patch here and I'll glad to have a look.
Comment 3 Carlos Soriano 2016-01-04 11:47:57 UTC
ah sorry, this was fixed already :)
Comment 4 prepangolin 2016-01-06 01:00:36 UTC
Ok, I marked this issue to Fixed resolved by myself, but this issue was not fixed in the official version. So I will upload the patch here so that you can check, I 've worked on the nautilus 3.4.2.
Comment 5 prepangolin 2016-01-06 01:02:24 UTC
Created attachment 318303 [details] [review]
Worked on Nautilus 3.4.2, Need for review
Comment 6 Carlos Soriano 2016-01-06 13:40:49 UTC
Review of attachment 318303 [details] [review]:

thanks for the patch!
It doesn't look like the right approach tho.

::: nautilus-3.4.2.orig/libnautilus-private/nautilus-file-operations.c
@@ +197,2 @@
 #define ZEITGEIST_NAUTILUS_ACTOR "application://nautilus.desktop"
+#define LGI_2015_12_24

What is this?

@@ +4784,3 @@
 		g_object_unref (src_dir);
 	}
+#else

You are just bypassing the undo_manager_pop_flag?
That looks wrong, it's there for a reason.
Comment 7 prepangolin 2016-01-06 15:01:57 UTC
Yes, I am just bypassing the undo_manager_pop_flag().
What do you recommend to fix this error?
Comment 8 prepangolin 2016-01-07 01:10:28 UTC
Thanks for your review.
This flag is for checking for undo/redo status as you know.
So, I should take one period of Undo copy and Redo copy during the the copy operation thus the another copy operation cannot effect the current copy operation, after all current bug was occured.
So, I bypassed the undo_manager_pop_flag() operation in the copy operation.
I've already confirmed that current patch fixed the bug.
This approach makes sense?
Comment 9 prepangolin 2016-01-08 08:23:21 UTC
Sorry for the confusion all.
I 've made the status of issue as incomplete status again.
Comment 10 prepangolin 2016-01-08 08:23:27 UTC
Sorry for the confusion all.
I 've made the status of issue as incomplete status again.