diff --git a/cli/cli.cc b/cli/cli.cc index c347f3ffd..017f636ed 100644 --- a/cli/cli.cc +++ b/cli/cli.cc @@ -257,7 +257,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 }