about summary refs log tree commit diff
path: root/src/libutil
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/compression.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libutil/compression.cc b/src/libutil/compression.cc
index b047d305cfa6..beede13211fa 100644
--- a/src/libutil/compression.cc
+++ b/src/libutil/compression.cc
@@ -1,5 +1,5 @@
 #include "compression.hh"
-#include "types.hh"
+#include "util.hh"
 
 #include <lzma.h>
 #include <cstdio>
@@ -35,6 +35,7 @@ std::string compressXZ(const std::string & in)
     strm().avail_out = sizeof(outbuf);
 
     while (true) {
+        checkInterrupt();
 
         if (strm().avail_in == 0)
             action = LZMA_FINISH;
@@ -73,6 +74,7 @@ ref<std::string> decompressXZ(const std::string & in)
     strm().avail_out = sizeof(outbuf);
 
     while (true) {
+        checkInterrupt();
 
         if (strm().avail_in == 0)
             action = LZMA_FINISH;