about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libstore/store.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstore/store.cc b/src/libstore/store.cc
index 14a3ff6cba46..e676216c9fb4 100644
--- a/src/libstore/store.cc
+++ b/src/libstore/store.cc
@@ -546,7 +546,8 @@ void deleteFromStore(const Path & _path)
     assertStorePath(path);
 
     Transaction txn(nixDB);
-    invalidatePath(path, txn);
+    if (isValidPathTxn(txn, path))
+        invalidatePath(path, txn);
     txn.commit();
 
     deletePath(path);