aboutsummaryrefslogtreecommitdiff
path: root/nix/libutil/util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'nix/libutil/util.cc')
-rw-r--r--nix/libutil/util.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/nix/libutil/util.cc b/nix/libutil/util.cc
index 768e12b5e4..9a83876013 100644
--- a/nix/libutil/util.cc
+++ b/nix/libutil/util.cc
@@ -309,7 +309,7 @@ static void _deletePath(const Path & path, unsigned long long & bytesFreed)
struct stat st = lstat(path);
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 writable. */