fix spurious tr_error being set when reading up to eof Fix error introduced in the previous fixup :P
This commit is contained in:
parent
c8f5cff564
commit
4cc952f0ca
|
@ -158,7 +158,7 @@ int readOrWriteBytes(
|
|||
switch (io_mode)
|
||||
{
|
||||
case IoMode::Read:
|
||||
if (!readEntireBuf(*fd, file_offset, buf, buflen, &error))
|
||||
if (!readEntireBuf(*fd, file_offset, buf, buflen, &error) && error != nullptr)
|
||||
{
|
||||
err = error->code;
|
||||
tr_logAddErrorTor(
|
||||
|
@ -173,7 +173,7 @@ int readOrWriteBytes(
|
|||
break;
|
||||
|
||||
case IoMode::Write:
|
||||
if (!writeEntireBuf(*fd, file_offset, buf, buflen, &error))
|
||||
if (!writeEntireBuf(*fd, file_offset, buf, buflen, &error) && error != nullptr)
|
||||
{
|
||||
err = error->code;
|
||||
tr_logAddErrorTor(
|
||||
|
|
Loading…
Reference in New Issue