Page 1 of 1

Verify after copy:Check file sizes first

Posted: 2013-09-29, 21:31 UTC
by white
Suggestion for verify after copy feature:

Check if file size is correct before checking CRC. :lol:

Posted: 2013-09-30, 06:18 UTC
by MVV
Unfortunately file size is not stored in CRC files.

Posted: 2013-09-30, 10:54 UTC
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.

Posted: 2013-09-30, 11:38 UTC
by MVV
Sorry, you're right, I thought about regular CRC calculation.

Posted: 2013-09-30, 14:24 UTC
by ghisler(Author)
I will consider it. But TC shouldn't check the checksum anyway when the copy function stops in the middle...

Posted: 2013-09-30, 14:34 UTC
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.

Posted: 2013-10-03, 17:10 UTC
by Jivan_Mukta
I join to such a suggestion.

Posted: 2013-10-04, 00:37 UTC
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

Posted: 2013-10-04, 06:17 UTC
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.

Posted: 2013-10-04, 10:00 UTC
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?

Posted: 2013-10-04, 15:22 UTC
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.

Posted: 2013-10-14, 06:06 UTC
by MaxX
Support.
It would be good to check CRC only when filesize is correct.
CRC would be wrong anyway if size becomes diffrent.

Posted: 2013-10-14, 08:04 UTC
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)

Posted: 2013-10-14, 13:57 UTC
by ghisler(Author)
Yes indeed.