mirror of
https://github.com/NixOS/nix
synced 2025-06-27 04:21:16 +02:00
* Remove the fdatasync check since it's no longer needed.
This commit is contained in:
parent
bb82310dba
commit
5954eadf67
3 changed files with 2 additions and 8 deletions
|
@ -227,13 +227,12 @@ string readFile(const Path & path)
|
|||
}
|
||||
|
||||
|
||||
void writeFile(const Path & path, const string & s, bool doFsync)
|
||||
void writeFile(const Path & path, const string & s)
|
||||
{
|
||||
AutoCloseFD fd = open(path.c_str(), O_WRONLY | O_TRUNC | O_CREAT, 0666);
|
||||
if (fd == -1)
|
||||
throw SysError(format("opening file `%1%'") % path);
|
||||
writeFull(fd, (unsigned char *) s.c_str(), s.size());
|
||||
if (doFsync) fdatasync(fd);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue