fix: no such file or directory warning in transmission-cli (#5426)

This commit is contained in:
Charles Kerr 2023-04-20 17:40:34 -05:00 committed by GitHub
parent ce4ffc3bdb
commit f9178eb084
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -259,7 +259,8 @@ int tr_main(int argc, char* argv[])
tr_ctorSetPaused(ctor, TR_FORCE, false);
if (tr_ctorSetMetainfoFromFile(ctor, torrentPath, nullptr) || tr_ctorSetMetainfoFromMagnetLink(ctor, torrentPath, nullptr))
if (tr_sys_path_exists(torrentPath) ? tr_ctorSetMetainfoFromFile(ctor, torrentPath, nullptr) :
tr_ctorSetMetainfoFromMagnetLink(ctor, torrentPath, nullptr))
{
// all good
}