* 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
|
@ -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);
|
||||
|
||||
bytesFreed += st.st_size;
|
||||
blocksFreed += st.st_blocks;
|
||||
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