GNOME Bugzilla – Bug 128095
Duplicate can DELETE files in original folder !!!
Last modified: 2004-12-22 21:47:04 UTC
Description of Problem: Steps to reproduce the problem: 1. in Nautilus file manager - right click on some big folder(very important) 2. click on Duplicate 3. click Cancel as fast as posible - before it start to actually copy files 4. there is new window which DELETE files from folder which one actually wanted to DUPLICATE Actual Results: DELETED data Expected Results: DUPLICATED data How often does this happen? Every time in described conditions Additional Information:
I'm not seeing this. What version of GNOME is this?
- OS is RedHat 9.0 Linux and the version of Nautilus is 2.2.1 - Duplicate in Nautilus works fine for > smaller and not-so-big directories (less than few 100MBytes). - Try to click on Duplicate on some directory with about 1GB of data -> > after that there is window with the message Preparing for copy... > now try to click Cancel (during this message) > after that, there is Delete window which deletes files... - the same thing was happened with Nautilus 2.0.x in Mandrake 9.0 Linux
I tried with Copy - Paste function with directory about 500MB the same thing was happened...
I can't reproduce on nautilus 2.4.X using a 1.1GB folder, in fact I don't ever see a "Preparing for copy..." dialog. Can you reproduce this on 2.4? Changing Status -> Reopened.
I've installed Mandrake 9.2 which has Nautilus 2.4.0 and I've tested with copy of /usr directory and the same thing happened. Additionally with upgrade to Nautilus 2.4.1 the same thing happened. More explanations: First - everithing is tested on P4 Celeron 1.7GHz and 384 RAM and 40GB HDD with RedHat9.0, Mandrake9.0 and Mandrake9.2 second - try this - do copy /usr directory but don't click cancel while is on Preparing to Copy (yes, I saw Preparing to Copy message) - when full copy is done try to copy this /usr (copy) directory and click on Cancel during Prepare to Copy message -> wait and you will see Deleting window
Confirmed on Gentoo in Nautilus 2.4.1. Pretty Nasty. It will go through and completely delete the original folder. Adding GNOMEVER2.4 to Keywords.
During the setup of the transfer Nautilus gets progress info from vfs where the target still equals the source name because the name conflict resolution hasn't taken place yet. So when you cancel at that point, Nautilus concludes it wasn't finished copying the source dir to itself and nukes it as incomplete copy. Doh. To reproduce it easily, set SHOW_TIMEOUT in the progress dialog to 0 to make it pop up immediately.
Created attachment 22746 [details] [review] Proposed Patch
This patch adds a check to ensure that the source tree isn't deleted by accident.
Martin, Please remember to post this to nautilus-list so that the patch gets reviewed. Many thanks.
Committed to both branches today -> Marking FIXED. Nikola, thanks for catching this and providing such detailed info.
*** Bug 95302 has been marked as a duplicate of this bug. ***
*** Bug 133081 has been marked as a duplicate of this bug. ***
*** Bug 144332 has been marked as a duplicate of this bug. ***