Bug 271097

Summary: calculating available space after download fails in some cases
Product: [Applications] ktorrent Reporter: Victor Gavrish <loonyphoenix>
Component: generalAssignee: Joris Guisson <joris.guisson>
Status: RESOLVED FIXED    
Severity: minor    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Victor Gavrish 2011-04-16 14:13:22 UTC
Version:           unspecified (using KDE 4.6.2) 
OS:                Linux

When some of the files of the torrent exist, but aren't enabled for downloading, and instead other files are being downloaded, but are less in size than those already on disk.

When I enable for downloading the files already on disk, the available space is calculated correctly.

Example: http://i.imgur.com/PilMH.png

Reproducible: Didn't try

Steps to Reproduce:
1) Find a torrent with multiple files.
2) Download most of the torrent, but disable some files.
3) Delete the torrent.
4) Add it again, but enable only the files you didn't download first.

Actual Results:  
The available space after download counter is obviously wrong.

Expected Results:  
The results being right.

OS: Linux (x86_64) release 2.6.38-ARCH
Compiler: gcc
Comment 1 Joris Guisson 2011-04-25 09:50:00 UTC
Git commit 44f775d24bfc11764d3e8e310562412ec7821387 by Joris Guisson.
Committed on 25/04/2011 at 09:58.
Pushed by guisson into branch 'master'.

Fix wrong required diskspace calculation in some rare circumstances

BUG: 271097

M  +1    -0    ChangeLog     
M  +10   -7    ktorrent/dialogs/fileselectdlg.cpp     

http://commits.kde.org/ktorrent/44f775d24bfc11764d3e8e310562412ec7821387