about summary refs log tree commit diff
path: root/src/libstore/store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2005-12-15T21·11+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-12-15T21·11+0000
commit530b27df1e71852580d8b0d474543aeffe65618f (patch)
tree166f79c170b19ad82ca6bf9a3c77b96325b72aa1 /src/libstore/store.cc
parent5144f750c471cdb629750e96ddc913fb01fb9eef (diff)
* `nix-store --gc' prints out the number of bytes freed on stdout
  (even when it is interrupted by a signal).

Diffstat (limited to 'src/libstore/store.cc')
-rw-r--r--src/libstore/store.cc5
1 files changed, 3 insertions, 2 deletions
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);
 }