Prevent new torrent from saving resume data twice

PR #17951.
This commit is contained in:
Vladimir Golovnev 2022-10-30 08:28:51 +03:00 committed by GitHub
parent 4a5d2e2558
commit e19173c1f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2753,6 +2753,9 @@ bool SessionImpl::addTorrent_impl(const std::variant<MagnetUri, TorrentInfo> &so
p.flags |= lt::torrent_flags::duplicate_is_error;
// Prevent torrent from saving initial resume data twice
p.flags &= ~lt::torrent_flags::need_save_resume;
p.added_time = std::time(nullptr);
// Limits