about summary refs log tree commit diff
path: root/src/libstore/gc.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2009-11-23T21·21+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2009-11-23T21·21+0000
commitca50c83fbb8f3bfbbcc60203a518d4e5a7aa8349 (patch)
tree6c1ceec342d817f6810f9439a8aa076f61055520 /src/libstore/gc.cc
parent3d55f1eb57c04efc10a093379ea38d6c0aefa588 (diff)
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 d3cac06e4c..88ddad822b 100644
--- a/src/libstore/gc.cc
+++ b/src/libstore/gc.cc
@@ -512,6 +512,11 @@ bool LocalStore::tryToDelete(GCState & state, const Path & path)
                 }
         }
 
+        /* If gc-keep-derivations and gc-keep-outputs are both set,
+           it's possible that the path has already been deleted (due
+           to the recursion below), so bail out. */
+        if (!pathExists(path)) return true;
+
         /* If gc-keep-outputs is set, then don't delete this path if
            its deriver is not garbage.  !!! This is somewhat buggy,
            since there might be multiple derivers, but the database