1
0
Fork 0
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:
Eelco Dolstra 2019-08-29 14:49:58 +02:00
parent 31f5ecfaa5
commit a2c4fcd5e9
3 changed files with 6 additions and 7 deletions

View file

@ -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. */