diff --git a/src/qtlibtorrent/qtorrenthandle.cpp b/src/qtlibtorrent/qtorrenthandle.cpp index a7f896dce..4ef956fdb 100644 --- a/src/qtlibtorrent/qtorrenthandle.cpp +++ b/src/qtlibtorrent/qtorrenthandle.cpp @@ -325,12 +325,12 @@ QStringList QTorrentHandle::uneeded_files_path() const { QDir saveDir(save_path()); QStringList res; std::vector fp = torrent_handle::file_priorities(); - vector progress; + vector 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 && progress[i] < 1.) + if(fp[i] == 0 && progress[i] < filesize_at(i)) res << QDir::cleanPath(saveDir.absoluteFilePath(filepath(*fi))); fi++; ++i; @@ -506,10 +506,12 @@ void QTorrentHandle::prioritize_files(const vector &files) const { if((int)files.size() != torrent_handle::get_torrent_info().num_files()) return; qDebug() << Q_FUNC_INFO; bool was_seed = is_seed(); + vector progress; + torrent_handle::file_progress(progress); torrent_handle::prioritize_files(files); for(uint i=0; i