mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-30 01:26:15 +02:00
* In the garbage collector, don't count files with a link count > 1 in
the "bytes/blocks freed" statistics.
This commit is contained in:
parent
f9e766db98
commit
8022015552
1 changed files with 4 additions and 2 deletions
|
@ -297,8 +297,10 @@ static void _deletePath(const Path & path, unsigned long long & bytesFreed,
|
|||
if (lstat(path.c_str(), &st))
|
||||
throw SysError(format("getting attributes of path `%1%'") % path);
|
||||
|
||||
if (!S_ISDIR(st.st_mode) && st.st_nlink == 1) {
|
||||
bytesFreed += st.st_size;
|
||||
blocksFreed += st.st_blocks;
|
||||
}
|
||||
|
||||
if (S_ISDIR(st.st_mode)) {
|
||||
Strings names = readDirectory(path);
|
||||
|
|
Loading…
Reference in a new issue