mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-10-22 18:56:08 +03:00
- Make sure the torrent is valid before saving fast resume data
This commit is contained in:
parent
45e56c02ee
commit
ce31bef2cf
1 changed files with 1 additions and 0 deletions
|
@ -1136,6 +1136,7 @@ void Bittorrent::saveFastResumeData() {
|
||||||
if (!rd->resume_data) continue;
|
if (!rd->resume_data) continue;
|
||||||
QDir torrentBackup(misc::qBittorrentPath() + "BT_backup");
|
QDir torrentBackup(misc::qBittorrentPath() + "BT_backup");
|
||||||
QTorrentHandle h(rd->handle);
|
QTorrentHandle h(rd->handle);
|
||||||
|
if(!h.is_valid()) continue;
|
||||||
// Remove old fastresume file if it exists
|
// Remove old fastresume file if it exists
|
||||||
QFile::remove(torrentBackup.path()+QDir::separator()+ h.hash() + ".fastresume");
|
QFile::remove(torrentBackup.path()+QDir::separator()+ h.hash() + ".fastresume");
|
||||||
QString file = h.hash()+".fastresume";
|
QString file = h.hash()+".fastresume";
|
||||||
|
|
Loading…
Reference in a new issue