Bug 347756 - Incorrect size of existing files on torrent update
Summary: Incorrect size of existing files on torrent update
Status: CONFIRMED
Alias: None
Product: ktorrent
Classification: Applications
Component: general (show other bugs)
Version: 4.3.1
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Joris Guisson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-15 12:15 UTC by Lastique
Modified: 2021-06-09 11:49 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
The screenshot illustrating the problem. (26.29 KB, image/png)
2015-05-15 12:15 UTC, Lastique
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lastique 2015-05-15 12:15:07 UTC
When I update a torrent in Ktorrent the total size of the existing files in the torrent addition window (see the screenshot) is incorrect. In my case on the screenshot the actual size of the existing 40 files is more than 26 GiB.

Reproducible: Didn't try

Steps to Reproduce:
1. Have a downloaded torrent in Ktorrent. The torrent needs to be updated on the tracker by adding a few new files.
2. Select the torrent in Ktorrent and delete it (without deleting the data).
3. Download the updated torrent and open it in Ktorrent.
4. Select the target directory to be the same as the previously deleted torrent. Ktorrent should recognize the already downloaded files.

Actual Results:  
The total size occupied by the existing files is incorrect.

Expected Results:  
The total size occupied by the existing files should be correct.

Kubuntu 15.04, x86_64, KDE installed from Kubuntu backports.
Comment 1 Lastique 2015-05-15 12:15:53 UTC
Created attachment 92618 [details]
The screenshot illustrating the problem.
Comment 2 Justin Zobel 2020-10-30 06:17:59 UTC
Can you please confirm this is still an issue on a recent version of KTorrent.
Comment 3 Lastique 2020-10-30 12:20:08 UTC
KTorrent 5.1.2 from Kubuntu 20.04 doesn't seem to display the size of the existing files at all. It displays the total size of the files in the torrent and shows the amount of space that will be left free after downloading, which is calculated without accounting that some of the files are already downloaded (i.e. the resulting number if not correct).
Comment 4 Lastique 2020-12-15 12:47:23 UTC
I had just reproduced this issue with KTorrent 5.2.0 in Kubuntu 20.10. In this case, the amount of space occupied by the already downloaded files was displayed and it was incorrect (displayed ~180 MiB, actual ~1.85 GiB).

I'm not sure if the case when the size was not displayed at all (in KTorrent 5.1.2) is a separate issue, or maybe it is dependent on some unknown factor. If it matters, I performed that test with the torrent files residing on an HDD, and this latest test - on SSD.
Comment 5 Lastique 2021-06-09 11:49:12 UTC
Still happens in KTorrent 20.12.3 from Kubuntu 21.04.