about summary refs log tree commit diff
diff options
context:
space:
mode:
-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);
     }
 }