diff options
Diffstat (limited to 'src/libstore/gc.cc')
-rw-r--r-- | src/libstore/gc.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc index 32cfbd022..552016584 100644 --- a/src/libstore/gc.cc +++ b/src/libstore/gc.cc @@ -565,6 +565,11 @@ static bool isLive(const Path & path, const PathSet & livePaths, if (hasSuffix(path, ".lock") && tempRoots.find(string(path, 0, path.size() - 5)) != tempRoots.end()) return true; + /* Don't delete .chroot directories for derivations that are + currently being built. */ + if (hasSuffix(path, ".chroot") && tempRoots.find(string(path, 0, path.size() - 7)) != tempRoots.end()) + return true; + return false; } |