aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nix/libstore/pathlocks.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/nix/libstore/pathlocks.cc b/nix/libstore/pathlocks.cc
index 830858ff8d..9797ddd7ab 100644
--- a/nix/libstore/pathlocks.cc
+++ b/nix/libstore/pathlocks.cc
@@ -162,7 +162,11 @@ bool PathLocks::lockPaths(const PathSet & _paths,
PathLocks::~PathLocks()
{
- unlock();
+ try {
+ unlock();
+ } catch (...) {
+ ignoreException();
+ }
}