Verify after copy:Check file sizes first

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

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

Verify after copy:Check file sizes first

Post by *white »

Suggestion for verify after copy feature:

Check if file size is correct before checking CRC. :lol:
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Unfortunately file size is not stored in CRC files.
User avatar
white
Power Member
Power Member
Posts: 5988
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

MVV wrote:Unfortunately file size is not stored in CRC files.
I know, but file size can be detected when copying a file. I wasn't suggesting this for the Verify Checksums feature.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Sorry, you're right, I thought about regular CRC calculation.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50873
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I will consider it. But TC shouldn't check the checksum anyway when the copy function stops in the middle...
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5988
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

ghisler(Author) wrote:I will consider it. But TC shouldn't check the checksum anyway when the copy function stops in the middle...
TC should also not check after appending, except after appending to a 0 byte file. But this behavior is very convenient for testing, so I suggest to fix this later.
Jivan_Mukta
Junior Member
Junior Member
Posts: 28
Joined: 2013-09-23, 19:25 UTC

Post by *Jivan_Mukta »

I join to such a suggestion.
User avatar
Hacker
Moderator
Moderator
Posts: 13144
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Christian,
If if the file sizes are equal, I would suggest to compare
  1. the first few bytes of the files
  2. the last few bytes of the files
  3. the middle few bytes of the files
  4. and perhaps a few bytes from a random location in the files
Shouldn't increase the comparison noticeably if files are equal but should decrease the duration of the verify operation by quite a lot if they are not.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

If if the file sizes are equal, I would suggest to compare
I think such actions should only be performed in case of large files.
User avatar
white
Power Member
Power Member
Posts: 5988
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

white wrote:TC should also not check after appending, except after appending to a 0 byte file. But this behavior is very convenient for testing, so I suggest to fix this later.
HISTORY.TXT wrote:01.10.13 Fixed: Verify after copy not working correctly when appending to existing file (32/64)
It seems now the appended part is checked for CRC errors. Nice! :)

I noticed a difference in verifying after appending and after normal copying. If something is appended to the file during verify, verify after copy does not report a CRC error, but verify after appending does. Perhaps the offset for verifying after appending is calculated using file size?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50873
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately it's currently not possible to handle the case of appending a partial file, so you will get an error, sorry.
Author of Total Commander
https://www.ghisler.com
User avatar
MaxX
Power Member
Power Member
Posts: 1189
Joined: 2012-03-23, 18:15 UTC
Location: UA

Post by *MaxX »

Support.
It would be good to check CRC only when filesize is correct.
CRC would be wrong anyway if size becomes diffrent.
Ukrainian Total Commander Translator. Feedback and discuss.
User avatar
white
Power Member
Power Member
Posts: 5988
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

MaxX wrote:Support.
It would be good to check CRC only when filesize is correct.
CRC would be wrong anyway if size becomes diffrent.
I think it has already been added.
HISTORY.TXT wrote:01.10.13 Fixed: Verify after copy: Warn if file size wrong (32/64)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50873
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Yes indeed.
Author of Total Commander
https://www.ghisler.com
Post Reply