mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-08 06:00:59 -07:00
parent
cab5edb721
commit
a0e41a11de
4 changed files with 47 additions and 21 deletions
|
@ -3103,8 +3103,16 @@ void SessionImpl::generateResumeData()
|
|||
void SessionImpl::saveResumeData()
|
||||
{
|
||||
for (const TorrentImpl *torrent : asConst(m_torrents))
|
||||
torrent->nativeHandle().save_resume_data(lt::torrent_handle::only_if_modified);
|
||||
m_numResumeData += m_torrents.size();
|
||||
{
|
||||
// When the session is terminated due to unrecoverable error
|
||||
// some of the torrent handles can be corrupted
|
||||
try
|
||||
{
|
||||
torrent->nativeHandle().save_resume_data(lt::torrent_handle::only_if_modified);
|
||||
++m_numResumeData;
|
||||
}
|
||||
catch (const std::exception &) {}
|
||||
}
|
||||
|
||||
// clear queued storage move jobs except the current ongoing one
|
||||
if (m_moveStorageQueue.size() > 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue