mirror of
https://github.com/transmission/transmission
synced 2025-01-30 19:03:04 +00:00
fix: transmission-remote warning when adding magnet link (#5088)
This commit is contained in:
parent
f53e58c8bd
commit
5ada8c46d4
1 changed files with 2 additions and 2 deletions
|
@ -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) });
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue