mirror of
https://github.com/NixOS/nix.git
synced 2025-12-22 08:51:08 +01:00
libutil: Fix FdSource::read on Windows
We need to signal the EOF condition, otherwise the read never terminates.
This commit is contained in:
parent
89dc57f6aa
commit
0695630eb5
1 changed files with 1 additions and 1 deletions
|
|
@ -163,11 +163,11 @@ size_t FdSource::readUnbuffered(char * data, size_t len)
|
||||||
_good = false;
|
_good = false;
|
||||||
throw SysError("reading from file");
|
throw SysError("reading from file");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (n == 0) {
|
if (n == 0) {
|
||||||
_good = false;
|
_good = false;
|
||||||
throw EndOfFile(std::string(*endOfFileError));
|
throw EndOfFile(std::string(*endOfFileError));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
read += n;
|
read += n;
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue