mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 20:35:36 +00:00
#5908: Check for tr_loadFile return value instead of errno in tr_variantFromFile
Seems like there could be a defect in uClibc making errno not thread-local. Don't rely on errno value but check function return value instead which is a better failure indicator. Return errors from `tr_loadFile` and `tr_variantFromFile` via tr_error. Fix `tr_sessionLoadSettings` to not fail on Windows if settings.json does not exist.
This commit is contained in:
@@ -532,7 +532,7 @@ getEncodedMetainfo (const char * filename)
|
||||
{
|
||||
size_t len = 0;
|
||||
char * b64 = NULL;
|
||||
uint8_t * buf = tr_loadFile (filename, &len);
|
||||
uint8_t * buf = tr_loadFile (filename, &len, NULL);
|
||||
|
||||
if (buf)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user