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 341064 - Progress dialog shows wrong file being copied
Progress dialog shows wrong file being copied
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: File and Folder Operations
0.x.x [obsolete]
Other All
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 333366 341023 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-05-08 18:32 UTC by Federico Mena Quintero
Modified: 2006-05-08 23:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
nautilus-66073-update-progress-dialog.diff (1.89 KB, patch)
2006-05-08 18:44 UTC, Federico Mena Quintero
committed Details | Review

Description Federico Mena Quintero 2006-05-08 18:32:02 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.
Comment 1 Federico Mena Quintero 2006-05-08 18:44:43 UTC
Created attachment 65044 [details] [review]
nautilus-66073-update-progress-dialog.diff

This is the patch I'm using for the Novell package.
Comment 2 Martin Wehner 2006-05-08 19:20:36 UTC
Comment on attachment 65044 [details] [review]
nautilus-66073-update-progress-dialog.diff

Great, please commit on both branches.
Comment 3 Martin Wehner 2006-05-08 19:23:48 UTC
*** Bug 341023 has been marked as a duplicate of this bug. ***
Comment 4 Martin Wehner 2006-05-08 19:26:51 UTC
*** Bug 333366 has been marked as a duplicate of this bug. ***
Comment 5 Federico Mena Quintero 2006-05-08 23:06:11 UTC
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