mirror of
https://github.com/NixOS/nix
synced 2025-06-27 00:11:17 +02:00
Remove the drain
argument from readFile
Now it is always `drain` (see previous commit).
This commit is contained in:
parent
5a34a473dd
commit
7afcb5af98
5 changed files with 9 additions and 6 deletions
|
@ -316,12 +316,12 @@ string readFile(int fd)
|
|||
}
|
||||
|
||||
|
||||
string readFile(const Path & path, bool drain)
|
||||
string readFile(const Path & path)
|
||||
{
|
||||
AutoCloseFD fd = open(path.c_str(), O_RDONLY | O_CLOEXEC);
|
||||
if (!fd)
|
||||
throw SysError(format("opening file '%1%'") % path);
|
||||
return drain ? drainFD(fd.get()) : readFile(fd.get());
|
||||
return readFile(fd.get());
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue