mirror of
https://github.com/NixOS/nix
synced 2025-06-28 09:31:16 +02:00
Drop the block count in the garbage collector
This commit is contained in:
parent
967d066d8e
commit
01d56c1eec
9 changed files with 23 additions and 37 deletions
|
@ -606,18 +606,17 @@ void getOwnership(const Path & path)
|
|||
}
|
||||
|
||||
|
||||
void deletePathWrapped(const Path & path,
|
||||
unsigned long long & bytesFreed, unsigned long long & blocksFreed)
|
||||
void deletePathWrapped(const Path & path, unsigned long long & bytesFreed)
|
||||
{
|
||||
try {
|
||||
/* First try to delete it ourselves. */
|
||||
deletePath(path, bytesFreed, blocksFreed);
|
||||
deletePath(path, bytesFreed);
|
||||
} catch (SysError & e) {
|
||||
/* If this failed due to a permission error, then try it with
|
||||
the setuid helper. */
|
||||
if (haveBuildUsers() && !amPrivileged()) {
|
||||
getOwnership(path);
|
||||
deletePath(path, bytesFreed, blocksFreed);
|
||||
deletePath(path, bytesFreed);
|
||||
} else
|
||||
throw;
|
||||
}
|
||||
|
@ -626,8 +625,8 @@ void deletePathWrapped(const Path & path,
|
|||
|
||||
void deletePathWrapped(const Path & path)
|
||||
{
|
||||
unsigned long long dummy1, dummy2;
|
||||
deletePathWrapped(path, dummy1, dummy2);
|
||||
unsigned long long dummy1;
|
||||
deletePathWrapped(path, dummy1);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue