fix: misleading error message when resume file is missing (#4799)

Fixes #4712.
This commit is contained in:
Charles Kerr 2023-02-10 14:01:39 -06:00 committed by GitHub
parent 7eecd87034
commit d0b148c033
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -639,6 +639,11 @@ auto loadFromFile(tr_torrent* tor, tr_resume::fields_t fields_to_load, bool* did
}
auto const filename = tor->resumeFile();
if (!tr_sys_path_exists(filename))
{
return fields_loaded;
}
auto buf = std::vector<char>{};
tr_error* error = nullptr;
auto top = tr_variant{};