1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-22 17:01: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:
Sergei Zimmerman 2025-12-17 23:48:35 +03:00
parent 89dc57f6aa
commit 0695630eb5
No known key found for this signature in database

View file

@ -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;
} }