1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 01:51:47 +02:00

* Make the garbage collector more resilient to certain consistency

errors: in-use paths now cause a warning, not a fatal error.
This commit is contained in:
Eelco Dolstra 2007-01-14 16:24:49 +00:00
parent 8659edc098
commit 8f67b35886
3 changed files with 10 additions and 4 deletions

View file

@ -599,9 +599,13 @@ void LocalStore::collectGarbage(GCAction action, const PathSet & pathsToDelete,
printMsg(lvlInfo, format("deleting `%1%'") % *i);
/* Okay, it's safe to delete. */
unsigned long long freed;
deleteFromStore(*i, freed);
bytesFreed += freed;
try {
unsigned long long freed;
deleteFromStore(*i, freed);
bytesFreed += freed;
} catch (PathInUse & e) {
printMsg(lvlError, format("warning: %1%") % e.msg());
}
#ifndef __CYGWIN__
if (fdLock != -1)