mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-14 02:27:09 -07:00
Merge pull request #6252 from evsh/fix-6248
Do not remove added files unconditionally. Closes #6248
This commit is contained in:
commit
5a611b66a5
1 changed files with 4 additions and 2 deletions
|
@ -1576,8 +1576,10 @@ bool Session::addTorrent(QString source, const AddTorrentParams ¶ms)
|
|||
}
|
||||
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue