1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-02-05 11:24:15 +00:00

Merge pull request #6252 from evsh/fix-6248

Do not remove added files unconditionally. Closes #6248
This commit is contained in:
sledgehammer999 2017-01-18 02:42:10 +02:00 committed by GitHub
commit 5a611b66a5

View File

@ -1576,8 +1576,10 @@ bool Session::addTorrent(QString source, const AddTorrentParams &params)
} }
else { else {
TorrentFileGuard guard(source); TorrentFileGuard guard(source);
guard.markAsAddedToSession(); if (addTorrent_impl(params, MagnetUri(), TorrentInfo::loadFromFile(source))) {
return addTorrent_impl(params, MagnetUri(), TorrentInfo::loadFromFile(source)); guard.markAsAddedToSession();
return true;
}
} }
return false; return false;