Reget on file copying misreports progress

Paweł Sakowski pawel at sakowski.eu.org
Sun Mar 3 14:47:59 UTC 2002


As in the subject. Let's:

1. Create /tmp/a with size of 200 MB (e.g. dd if=/dev/zero).
2. Create /tmp/b, 180 MB.
3. Copy (F5) /tmp/a => /tmp/b.
4. File exists, let's choose "Reget".

Now the progress bar runs from 0% to 20%, then the copying ends. It
seems that the progress is determined by dividing the amount of data
transferred by the file size, which doesn't work properly when
regetting.

The algorithm should be changed in either of two ways:

- data_transferred/(a_size-b_size), which gives progress between 0%-100%

- (b_size+data_transferred)/a_size, which gives progress between
80%-100%

I'm not sure which one is better.

According to FAQ #9.3 I'm mentioning I'm not on the mailing list :)

-- 
+--------------------------------------------------------------------+
|     Avoid the Gates of Hell.     :              Pawel Sakowski     |
|            Use Linux.            :     <pawel at sakowski.eu.org>     |
+--------------------------------------------------------------------+
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: not available
URL: <http://lists.midnight-commander.org/pipermail/mc-devel/attachments/20020303/aef68d4c/attachment.asc>


More information about the mc-devel mailing list