mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 07:27:22 -06:00
Added back removal of uneeded files on torrent deletion (but not do remove the ones that are complete)
This commit is contained in:
@@ -325,10 +325,12 @@ QStringList QTorrentHandle::uneeded_files_path() const {
|
||||
QDir saveDir(save_path());
|
||||
QStringList res;
|
||||
std::vector<int> fp = torrent_handle::file_priorities();
|
||||
vector<float> progress;
|
||||
torrent_handle::file_progress(progress);
|
||||
torrent_info::file_iterator fi = torrent_handle::get_torrent_info().begin_files();
|
||||
int i = 0;
|
||||
while(fi != torrent_handle::get_torrent_info().end_files()) {
|
||||
if(fp[i] == 0)
|
||||
if(fp[i] == 0 && progress[i] < 1.)
|
||||
res << QDir::cleanPath(saveDir.absoluteFilePath(filepath(*fi)));
|
||||
fi++;
|
||||
++i;
|
||||
|
||||
Reference in New Issue
Block a user