From 5d82e1e62fb4881a2e231a31e358a388883edcc7 Mon Sep 17 00:00:00 2001 From: sinavir Date: Sun, 21 Jul 2024 12:10:25 +0200 Subject: 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 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12007 Reviewed-by: raitobezarius Tested-by: BuildkiteCI Reviewed-by: flokli --- tvix/store/src/pathinfoservice/nix_http.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tvix') diff --git a/tvix/store/src/pathinfoservice/nix_http.rs b/tvix/store/src/pathinfoservice/nix_http.rs index b74385c637ac..a2756033172f 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)) + 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, -- cgit 1.4.1