mirror of
https://github.com/NixOS/nix
synced 2025-06-26 20:01:15 +02:00
* Move addTempRoot() to the store API, and add another function
syncWithGC() to allow clients to register GC roots without needing write access to the global roots directory or the GC lock.
This commit is contained in:
parent
30bf547f4f
commit
e25fad691a
11 changed files with 81 additions and 17 deletions
|
@ -122,7 +122,7 @@ Path dirOf(const Path & path)
|
|||
{
|
||||
Path::size_type pos = path.rfind('/');
|
||||
if (pos == string::npos)
|
||||
throw Error(format("invalid file name: %1%") % path);
|
||||
throw Error(format("invalid file name `%1%'") % path);
|
||||
return pos == 0 ? "/" : Path(path, 0, pos);
|
||||
}
|
||||
|
||||
|
@ -131,7 +131,7 @@ string baseNameOf(const Path & path)
|
|||
{
|
||||
Path::size_type pos = path.rfind('/');
|
||||
if (pos == string::npos)
|
||||
throw Error(format("invalid file name %1% ") % path);
|
||||
throw Error(format("invalid file name `%1%'") % path);
|
||||
return string(path, pos + 1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue