From f54f9e1c45ecdc52350bf3c88b402f1ef5e7d0ae Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 20 Apr 2023 17:40:34 -0500 Subject: [PATCH] fix: no such file or directory warning in transmission-cli (#5426) --- cli/cli.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 }