1
0
Fork 0
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:
Eelco Dolstra 2010-02-24 12:16:50 +00:00
parent bb82310dba
commit 5954eadf67
3 changed files with 2 additions and 8 deletions

View file

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