* Doh! Path sizes need to be computed recursively of course.
(NIX-70)
This commit is contained in:
parent
a76efaeb3f
commit
c6a97e3b74
3 changed files with 28 additions and 6 deletions
|
@ -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) {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue