TC756a:Download list:Wrong entries marked downloaded

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
white
Power Member
Power Member
Posts: 4622
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

TC756a:Download list:Wrong entries marked downloaded

Post by *white »

Code: Select all

http://download.thinkbroadband.com/100MB.zip

http://www.ghisler.com
http://www.ghisler.com/whatsnew.htm
http://www.ghisler.com/download.htm
http://www.ghisler.com/ce.htm

OK-comment

http://www.ghisler.com
http://www.ghisler.com/whatsnew.htm
http://www.ghisler.com/download.htm
http://www.ghisler.com/ce.htm
  1. Store above in a file and use menu option Net/FTP Download From List to download the list
  2. While the first file is being downloaded, pause the background transfer manager
  3. Mark the lines 3-6 in the background transfer manager by clicking the left mouse button
  4. Click the "-" button to remove the entries
  5. Confirm the deletion
  6. Click the "Start" button to continue downloading
  7. Wait until files are downloaded
  8. The wrong entries are now marked as downloaded:

    Code: Select all

    OK-p://download.thinkbroadband.com/100MB.zip
    
    OK-p://www.ghisler.com
    OK-p://www.ghisler.com/whatsnew.htm
    OK-p://www.ghisler.com/download.htm
    OK-p://www.ghisler.com/ce.htm
    
    OK-comment
    
    http://www.ghisler.com
    http://www.ghisler.com/whatsnew.htm
    http://www.ghisler.com/download.htm
    http://www.ghisler.com/ce.htm
    
Now use the following contents and repeat steps 1-7 above.

Code: Select all

http://download.thinkbroadband.com/100MB.zip

http://www.ghisler.com
http://www.ghisler.com/whatsnew.htm
http://www.ghisler.com/download.htm
http://www.ghisler.com/ce.htm

http://www.ghisler.com/order.htm

http://www.ghisler.com
http://www.ghisler.com/whatsnew.htm
http://www.ghisler.com/download.htm
http://www.ghisler.com/ce.htm
  • The correct entries are now marked as downloaded:

    Code: Select all

    OK-p://download.thinkbroadband.com/100MB.zip
    
    http://www.ghisler.com
    http://www.ghisler.com/whatsnew.htm
    http://www.ghisler.com/download.htm
    http://www.ghisler.com/ce.htm
    
    OK-p://www.ghisler.com/order.htm
    
    OK-p://www.ghisler.com
    OK-p://www.ghisler.com/whatsnew.htm
    OK-p://www.ghisler.com/download.htm
    OK-p://www.ghisler.com/ce.htm
    

Another example:

Code: Select all

copy:f:\a -> f:\a1
copy:f:\a -> f:\a2
copy:f:\a -> f:\a3

copy:f:\a -> f:\a1
copy:f:\a -> f:\a2
copy:f:\a -> f:\a3
  1. Create files named a, a1, a2, a3 on drive f:
  2. Use FTP Download From List on the 'download list' above
  3. Overwrite dialogs will popup. Choose Skip the first 3 times. Then choose Overwrite All
  4. The wrong lines are marked:

    Code: Select all

    OK-y:f:\a -> f:\a1
    OK-y:f:\a -> f:\a2
    OK-y:f:\a -> f:\a3
    
    copy:f:\a -> f:\a1
    copy:f:\a -> f:\a2
    copy:f:\a -> f:\a3
    
Now try the following list and do the same:

Code: Select all

copy:f:\a -> f:\a1
copy:f:\a -> f:\a2
copy:f:\a -> f:\a3

copy:f:\a -> f:\a4

copy:f:\a -> f:\a1
copy:f:\a -> f:\a2
copy:f:\a -> f:\a3
The result is OK:

Code: Select all

copy:f:\a -> f:\a1
copy:f:\a -> f:\a2
copy:f:\a -> f:\a3

OK-y:f:\a -> f:\a4

OK-y:f:\a -> f:\a1
OK-y:f:\a -> f:\a2
OK-y:f:\a -> f:\a3
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

# Store above in a file and use menu option Net/FTP Download From List to download the list
# While the first file is being downloaded, pause the background transfer manager
# Mark the lines 3-6 in the background transfer manager by clicking the left mouse button
# Click the "-" button to remove the entries
# Confirm the deletion
# Click the "Start" button to continue downloading
# Wait until files are downloaded
# The wrong entries are now marked as downloaded:
This isn't a bug. TC marks the first occurence of a download name as downloaded, when it is listed multiple times.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 4622
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

ghisler(Author) wrote:
# Store above in a file and use menu option Net/FTP Download From List to download the list
# While the first file is being downloaded, pause the background transfer manager
# Mark the lines 3-6 in the background transfer manager by clicking the left mouse button
# Click the "-" button to remove the entries
# Confirm the deletion
# Click the "Start" button to continue downloading
# Wait until files are downloaded
# The wrong entries are now marked as downloaded:
This isn't a bug. TC marks the first occurence of a download name as downloaded, when it is listed multiple times.
Then can you explain the second example where the last occurrence is marked as downloaded?

Code: Select all

http://download.thinkbroadband.com/100MB.zip

http://www.ghisler.com
http://www.ghisler.com/whatsnew.htm
http://www.ghisler.com/download.htm
http://www.ghisler.com/ce.htm

http://www.ghisler.com/order.htm

http://www.ghisler.com
http://www.ghisler.com/whatsnew.htm
http://www.ghisler.com/download.htm
http://www.ghisler.com/ce.htm
  • The correct entries are now marked as downloaded:

    Code: Select all

    OK-p://download.thinkbroadband.com/100MB.zip
    
    http://www.ghisler.com
    http://www.ghisler.com/whatsnew.htm
    http://www.ghisler.com/download.htm
    http://www.ghisler.com/ce.htm
    
    OK-p://www.ghisler.com/order.htm
    
    OK-p://www.ghisler.com
    OK-p://www.ghisler.com/whatsnew.htm
    OK-p://www.ghisler.com/download.htm
    OK-p://www.ghisler.com/ce.htm
    
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

TC remembers the last position in the list file where it put the OK- mark, and then searches from this point on for additional files, to avoid that when it started to mark files in the middle that files downloaded later would be marked above that point. So because order.htm was downloaded before whatsnew.htm, TC looks for whatsnew.htm below that point.

TC cannot store fixed offsets to the list file because the user may have added files at the beginning too.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 4622
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

ghisler(Author) wrote:TC remembers the last position in the list file where it put the OK- mark, and then searches from this point on for additional files, to avoid that when it started to mark files in the middle that files downloaded later would be marked above that point. So because order.htm was downloaded before whatsnew.htm, TC looks for whatsnew.htm below that point.

TC cannot store fixed offsets to the list file because the user may have added files at the beginning too.
Thanks for the explanation. :D

I think in most cases the download list is not changed by the user while downloading the list. It's ashame that functionality in this situation is broken by compensating for the situation where the list is changed by the user.

To fix this I suggest to update the offset not only when OK- mark is written, but also when entries are skipped. So when an entry is skipped (either due to failure, by user intervention or otherwise), also search the list for this entry beginning at last remembered offset. Then don't mark the entry in the file, but do update the offset.
Post Reply