mirror of
https://github.com/NixOS/nix
synced 2025-07-07 01:51:47 +02:00
deletePath(): Succeed if path doesn't exist
Also makes it robust against concurrent deletions.
This commit is contained in:
parent
28e7e29abd
commit
152b1d6bf9
5 changed files with 23 additions and 23 deletions
|
@ -608,7 +608,7 @@ void LocalStore::collectGarbage(const GCOptions & options, GCResults & results)
|
|||
|
||||
state.shouldDelete = options.action == GCOptions::gcDeleteDead || options.action == GCOptions::gcDeleteSpecific;
|
||||
|
||||
if (state.shouldDelete && pathExists(reservedPath))
|
||||
if (state.shouldDelete)
|
||||
deletePath(reservedPath);
|
||||
|
||||
/* Acquire the global GC root. This prevents
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue