From 530b27df1e71852580d8b0d474543aeffe65618f Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 15 Dec 2005 21:11:39 +0000 Subject: * `nix-store --gc' prints out the number of bytes freed on stdout (even when it is interrupted by a signal). --- src/libstore/store.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/libstore/store.cc') diff --git a/src/libstore/store.cc b/src/libstore/store.cc index 281ccc4bf147..dc3625a1d5da 100644 --- a/src/libstore/store.cc +++ b/src/libstore/store.cc @@ -746,8 +746,9 @@ Path addTextToStore(const string & suffix, const string & s, } -void deleteFromStore(const Path & _path) +void deleteFromStore(const Path & _path, unsigned long long & bytesFreed) { + bytesFreed = 0; Path path(canonPath(_path)); assertStorePath(path); @@ -763,7 +764,7 @@ void deleteFromStore(const Path & _path) } txn.commit(); - deletePath(path); + deletePath(path, bytesFreed); } -- cgit 1.4.1