mirror of
https://github.com/transmission/transmission.git
synced 2025-12-20 02:18:42 +00:00
fix: transmission-remote warning when adding magnet link (#5088)
This commit is contained in:
@@ -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<char>{}; tr_loadFile(filename, contents))
|
if (auto contents = std::vector<char>{}; tr_sys_path_exists(filename) && tr_loadFile(filename, contents))
|
||||||
{
|
{
|
||||||
return tr_base64_encode({ std::data(contents), std::size(contents) });
|
return tr_base64_encode({ std::data(contents), std::size(contents) });
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user