From c000e67769dabf33bceb383ae82387a1d9211598 Mon Sep 17 00:00:00 2001 From: sinavir Date: Sun, 21 Jul 2024 12:10:25 +0200 Subject: [PATCH] fix(tvix/store): Fix narinfo compression selection Parsing of the narinfo file sets the compression field to None instead of Some("none"). The mapping selecting the decompression reader expected the former in //tvix/store/src/pathinfoservice/nix_http.rs. Change-Id: I254a825b88a4016aab087446bdc0c7b6286de40c --- tvix/store/src/pathinfoservice/nix_http.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tvix/store/src/pathinfoservice/nix_http.rs b/tvix/store/src/pathinfoservice/nix_http.rs index af9234bc0..9b5394c69 100644 --- a/tvix/store/src/pathinfoservice/nix_http.rs +++ b/tvix/store/src/pathinfoservice/nix_http.rs @@ -179,8 +179,8 @@ where // handle decompression, depending on the compression field. let mut r: Box = match narinfo.compression { - Some("none") => Box::new(r) as Box, - Some("bzip2") | None => Box::new(async_compression::tokio::bufread::BzDecoder::new(r)) + Some("none") | None => Box::new(r) as Box, + Some("bzip2") => Box::new(async_compression::tokio::bufread::BzDecoder::new(r)) as Box, Some("gzip") => Box::new(async_compression::tokio::bufread::GzipDecoder::new(r)) as Box,