Delete a left-over trash directory before doing a GC
This commit is contained in:
parent
92926be2fe
commit
e42df686f3
1 changed files with 4 additions and 1 deletions
|
@ -659,7 +659,10 @@ void LocalStore::collectGarbage(const GCOptions & options, GCResults & results)
|
||||||
increase, since we hold locks on everything. So everything
|
increase, since we hold locks on everything. So everything
|
||||||
that is not reachable from `roots'. */
|
that is not reachable from `roots'. */
|
||||||
|
|
||||||
if (state.shouldDelete) createDirs(state.trashDir);
|
if (state.shouldDelete) {
|
||||||
|
if (pathExists(state.trashDir)) deleteGarbage(state, state.trashDir);
|
||||||
|
createDirs(state.trashDir);
|
||||||
|
}
|
||||||
|
|
||||||
/* Now either delete all garbage paths, or just the specified
|
/* Now either delete all garbage paths, or just the specified
|
||||||
paths (for gcDeleteSpecific). */
|
paths (for gcDeleteSpecific). */
|
||||||
|
|
Loading…
Reference in a new issue