diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-11-24 20:24:14 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-11-24 20:24:14 +0000 |
commit | c6a97e3b74289fdc8e57189212a0db3d0e6896e0 (patch) | |
tree | 45e9076f8a22a433725569148d24f7196991f76e /src/libstore/gc.cc | |
parent | a76efaeb3f2c1d7de6d41bd0e883b92e2d0f3d7f (diff) | |
download | guix-c6a97e3b74289fdc8e57189212a0db3d0e6896e0.tar.gz |
* Doh! Path sizes need to be computed recursively of course.
(NIX-70)
Diffstat (limited to 'src/libstore/gc.cc')
-rw-r--r-- | src/libstore/gc.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc index ed1b1a84a4..3a626dedae 100644 --- a/src/libstore/gc.cc +++ b/src/libstore/gc.cc @@ -528,12 +528,8 @@ void collectGarbage(GCAction action, const PathSet & pathsToDelete, /* If just returning the set of dead paths, we also return the space that would be freed if we deleted them. */ - if (action == gcReturnDead) { - struct stat st; - if (lstat(i->c_str(), &st) == -1) - st.st_size = 0; - bytesFreed += st.st_size; - } + if (action == gcReturnDead) + bytesFreed += computePathSize(*i); if (action == gcDeleteDead || action == gcDeleteSpecific) { |