diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2019-08-29T12·49+0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2019-08-29T12·49+0200 |
commit | a2c4fcd5e9782dc8d2998773380c7171ee53b813 (patch) | |
tree | 8ded004bb7d06f44dd28c08c922771238cc85cea /src/libutil/util.cc | |
parent | 31f5ecfaa5bce2282f50daed1e4f477c64705fb3 (diff) |
Don't rely on st_blocks
It doesn't seem very reliable on ZFS.
Diffstat (limited to 'src/libutil/util.cc')
-rw-r--r-- | src/libutil/util.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc index 44fa72482552..1b744999153a 100644 --- a/src/libutil/util.cc +++ b/src/libutil/util.cc @@ -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. */ |