diff --git a/utils/remote.cc b/utils/remote.cc index e7f955782..cb7aa6682 100644 --- a/utils/remote.cc +++ b/utils/remote.cc @@ -544,9 +544,9 @@ static int getOptMode(int val) } } -static std::string getEncodedMetainfo(std::string_view filename) +static std::string getEncodedMetainfo(char const* filename) { - if (auto contents = std::vector{}; tr_loadFile(filename, contents)) + if (auto contents = std::vector{}; tr_sys_path_exists(filename) && tr_loadFile(filename, contents)) { return tr_base64_encode({ std::data(contents), std::size(contents) }); }