aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-08-01 16:06:49 -0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-08-01 16:06:49 -0400
commit7b10562370919947c9df748a165587ec5fc6c2ea (patch)
tree1fd3dd83043f71ec0b69174634c6f631d6055891
parent157170059df39933d358d087d88f8b5bc4d5fde6 (diff)
Make ‘nix-store --optimise’ interruptible
-rw-r--r--src/libstore/optimise-store.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libstore/optimise-store.cc b/src/libstore/optimise-store.cc
index 486538bd2..2c3f59a72 100644
--- a/src/libstore/optimise-store.cc
+++ b/src/libstore/optimise-store.cc
@@ -51,6 +51,8 @@ struct MakeImmutable
void LocalStore::optimisePath_(OptimiseStats & stats, const Path & path)
{
+ checkInterrupt();
+
struct stat st;
if (lstat(path.c_str(), &st))
throw SysError(format("getting attributes of path `%1%'") % path);