mirror of
https://github.com/transmission/transmission
synced 2024-12-26 09:37:56 +00:00
fixes "no data found..." error on restart for paused torrents (#2797)
Co-authored-by: SweetPPro <sweetppro@users.noreply.github.com>
This commit is contained in:
parent
03ee0028d4
commit
6e1b89d9a7
1 changed files with 6 additions and 3 deletions
|
@ -771,9 +771,12 @@ static void torrentInit(tr_torrent* tor, tr_ctor const* ctor)
|
|||
auto has_local_data = std::optional<bool>{};
|
||||
if ((loaded & tr_resume::Progress) != 0)
|
||||
{
|
||||
// if tr_resume::load() populated checked_pieces_, initCheckedPieces()
|
||||
// already looked for local data on the filesystem
|
||||
has_local_data = !tor->checked_pieces_.hasNone();
|
||||
// if tr_resume::load() loaded progress info, then initCheckedPieces()
|
||||
// has already looked for local data on the filesystem
|
||||
has_local_data = std::any_of(
|
||||
std::begin(tor->file_mtimes_),
|
||||
std::end(tor->file_mtimes_),
|
||||
[](auto mtime) { return mtime > 0; });
|
||||
}
|
||||
|
||||
// if we don't have a local .torrent or .magnet file already, assume the torrent is new
|
||||
|
|
Loading…
Reference in a new issue