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

View File

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