From b68c4e21065fb6b1c84b53f8bfc0d0761cb08e74 Mon Sep 17 00:00:00 2001 From: Vladimir Golovnev Date: Sun, 13 Nov 2022 08:26:25 +0300 Subject: [PATCH] Save correct resume data when added new torrent PR #18003. --- src/base/bittorrent/sessionimpl.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/base/bittorrent/sessionimpl.cpp b/src/base/bittorrent/sessionimpl.cpp index 8a552759a..f84776eaf 100644 --- a/src/base/bittorrent/sessionimpl.cpp +++ b/src/base/bittorrent/sessionimpl.cpp @@ -2769,9 +2769,6 @@ bool SessionImpl::addTorrent_impl(const std::variant &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 @@ -5265,8 +5262,6 @@ TorrentImpl *SessionImpl::createTorrent(const lt::torrent_handle &nativeHandle, if (isRestored()) { - m_resumeDataStorage->store(torrent->id(), params); - // The following is useless for newly added magnet if (torrent->hasMetadata()) {