mirror of
https://github.com/NixOS/nix
synced 2025-06-27 00:11:17 +02:00
Don't rely on st_blocks
It doesn't seem very reliable on ZFS.
This commit is contained in:
parent
31f5ecfaa5
commit
a2c4fcd5e9
3 changed files with 6 additions and 7 deletions
|
@ -397,7 +397,7 @@ static void _deletePath(const Path & path, unsigned long long & bytesFreed)
|
|||
}
|
||||
|
||||
if (!S_ISDIR(st.st_mode) && st.st_nlink == 1)
|
||||
bytesFreed += st.st_blocks * 512;
|
||||
bytesFreed += st.st_size;
|
||||
|
||||
if (S_ISDIR(st.st_mode)) {
|
||||
/* Make the directory accessible. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue