about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-03-22T10·53+0100
committerEelco Dolstra <edolstra@gmail.com>2017-03-22T10·53+0100
commit0a7ca24c26d57d532df614bdfe78b8b5c228e90d (patch)
tree946bfd32d7d6c4551ce5782f16831ce174b7d036 /src
parent895a74a814cd67cd2e13d0621603583a2d15b159 (diff)
Fix xz decompression
Fixes #1285.
Diffstat (limited to 'src')
-rw-r--r--src/libutil/compression.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/libutil/compression.cc b/src/libutil/compression.cc
index f913d0f5badd..b0b1d709fa44 100644
--- a/src/libutil/compression.cc
+++ b/src/libutil/compression.cc
@@ -48,10 +48,7 @@ static ref<std::string> decompressXZ(const std::string & in)
             return res;
 
         if (ret != LZMA_OK)
-            throw CompressionError("error while decompressing xz file");
-
-        if (strm.avail_in == 0)
-            throw CompressionError("xz data ends prematurely");
+            throw CompressionError("error %d while decompressing xz file", ret);
     }
 }