![]() Registered Member ![]()
|
The subject line without abbreviations: 2 bugs: ktorrent ignores file size during integrity check; does not re-create missing/deleted files for torrents
version: 2.2.1 on KDE 3.5.7, using Archlinux binary package Condensed version: - if you append extra data to the end of files that are otherwise complete, ktorrent ignores it and only hash-checks the data up to what the torrent says the file size is. expected behaviour: ktorrent should either report integrity failed, or just silently delete the extraneous data to make the torrent perfect. - if a file is deleted from a torrent's destination, ktorrent goes into an endless loop asking whether the user wants to re-create the missing file Full story: I recently suffered some filesystem corruption (totally unrelated to ktorrent, except that ktorrent was running and downloading when it happened), and as a result several hundred files got holes punched into them filled with null bytes. I of course ran integrity checks on all my torrents (which were actually on a different partition from the one that got corrupted, but I'm guessing ktorrent caches some stuff temporarily under the user's homedir?) and ktorrent reported that they were all fine (integrity check gets to 100% with no errors / bad chunks reported). Then I went "less <one of the text files in one of the torrents>" and less tells me "This may be a binary file" -- so I look at it, and sure enough it's got null bytes in it, lots of them. I deleted the file and re-imported the torrent (I might've closed ktorrent after that and then deleted the file; I don't remember), which caused ktorrent to go into an endless loop of "File missing, do you want to create?" on which pressing any button caused the dialogue box to reappear... killed ktorrent & reopened and it created the file that time. I ran the integrity check again and this time it correctly said 1 bad chunk and re-downloaded it. ~Felix. |
![]() Moderator ![]()
|
And why would you want to append additional data to a file ? And why should KT care ? We are only interested in making sure that the data we downloaded is correct and that we are not uploading invalid data. Additional data will not prevent this.
Just tried this with the current SVN version and I can't reproduce it. |
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]