GNOME Bugzilla – Bug 341064
Progress dialog shows wrong file being copied
Last modified: 2006-05-08 23:06:11 UTC
Create two files: aaa.txt - hundreds of MB bbb.txt - a few bytes Select them both, and copy them to another directory. You'll get a file progress window. The files get copied in reverse alphabetical order (or something like that). If bbb.txt gets copied *first*, and before the progress dialog comes up, you'll see that the dialog says "copying bbb.txt, file 1 of 2" when it is obviously copying the large aaa.txt instead. By adding some printf()s to handle_transfer_ok(), we get this: PHASE_INITIAL NO PHASE (DEFAULT) PHASE_COLLECTING PHASE_COLLECTING PHASE_READYTOGO PHASE_MOVING/OPENSOURCE/OPENTARGET/COPYING: source_name: file:///home/federico/Desktop/nld10/bbb file_index: 1 bytes_copied == 0; setting full text PHASE_MOVING/OPENSOURCE/OPENTARGET/COPYING: ******* source_name: file:///home/federico/Desktop/nld10/aaa file_index: 2 bytes_copied == 126976; just setting sizes PHASE_MOVING/OPENSOURCE/OPENTARGET/COPYING: source_name: file:///home/federico/Desktop/nld10/aaa file_index: 2 bytes_copied == 524288; just setting sizes See the line marked with *******. We never get a "bytes_copied == 0" for the large file, since part of it already got copied before the dialog came up, so we never get to updating the labels. I don't think it hurts to just change the labels *and* the sizes every time; there is no need to make the logic more complicated by special-casing the first 0 bytes of each file.
Created attachment 65044 [details] [review] nautilus-66073-update-progress-dialog.diff This is the patch I'm using for the Novell package.
Comment on attachment 65044 [details] [review] nautilus-66073-update-progress-dialog.diff Great, please commit on both branches.
*** Bug 341023 has been marked as a duplicate of this bug. ***
*** Bug 333366 has been marked as a duplicate of this bug. ***
Thanks! Committed to HEAD and gnome-2-14. 2006-05-08 Federico Mena Quintero <federico@novell.com> * libnautilus-private/nautilus-file-operations.c (handle_transfer_ok): Don't special-case the first 0 bytes of the file in the case of reporting actual copy/move progress. It is fine to update both the labels and the sizes every time. Fixes http://bugzilla.gnome.org/show_bug.cgi?id=341064 https://bugzilla.novell.com/show_bug.cgi?id=66073