aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore')
-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 14a3ff6cb..e676216c9 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);