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:
parent
c547439843
commit
582e01c06f
8 changed files with 154 additions and 23 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue