about summary refs log tree commit diff
path: root/src/libstore/gc.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2016-12-08T20·38+0100
committerEelco Dolstra <edolstra@gmail.com>2016-12-08T20·38+0100
commitb30d1e7ada0a8fbaacc25e24e5e788d18bfe8d3c (patch)
tree235871d7e3b61c031ce2370ef1dbc7a0c576fa93 /src/libstore/gc.cc
parent88ef77226e0a395a0151297c295843d2e39f24d5 (diff)
Don't delete .check directories of running builds
We need to keep them around for diffoscope.
Diffstat (limited to 'src/libstore/gc.cc')
-rw-r--r--src/libstore/gc.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc
index ae03604faf98..f8c4a07238c7 100644
--- a/src/libstore/gc.cc
+++ b/src/libstore/gc.cc
@@ -621,6 +621,11 @@ void LocalStore::tryToDelete(GCState & state, const Path & path)
         /* Don't delete .chroot directories for derivations that are
            currently being built. */
         if (isActiveTempFile(state, path, ".chroot")) return;
+
+        /* Don't delete .check directories for derivations that are
+           currently being built, because we may need to run
+           diff-hook. */
+        if (isActiveTempFile(state, path, ".check")) return;
     }
 
     PathSet visited;