1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 20:01:15 +02:00

* Automatically upgrade <= 0.7 Nix stores to the new schema (so that

existing user environments continue to work).
* `nix-store --verify': detect incomplete closures.
This commit is contained in:
Eelco Dolstra 2005-02-09 09:50:29 +00:00
parent c547439843
commit 582e01c06f
8 changed files with 154 additions and 23 deletions

View file

@ -185,6 +185,15 @@ string readFile(const Path & path)
}
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());
}
static void _deletePath(const Path & path)
{
checkInterrupt();