about summary refs log tree commit diff
diff options
context:
space:
mode:
authorsinavir <sinavir@sinavir.fr>2024-07-21T10·10+0200
committersinavir <tvix@sinavir.fr>2024-07-21T22·11+0000
commit5d82e1e62fb4881a2e231a31e358a388883edcc7 (patch)
treef77fd217b48303b36ea8c33831b398404c15b425
parenta3194e9280da1d0d1d34cc3254dc135e982488a1 (diff)
fix(tvix/store): Fix narinfo compression selection r/8396
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 <tvl@lahfa.xyz>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
-rw-r--r--tvix/store/src/pathinfoservice/nix_http.rs4
1 files changed, 2 insertions, 2 deletions
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<dyn AsyncRead + Send + Unpin> = match narinfo.compression {
-            Some("none") => Box::new(r) as Box<dyn AsyncRead + Send + Unpin>,
-            Some("bzip2") | None => Box::new(async_compression::tokio::bufread::BzDecoder::new(r))
+            None => Box::new(r) as Box<dyn AsyncRead + Send + Unpin>,
+            Some("bzip2") => Box::new(async_compression::tokio::bufread::BzDecoder::new(r))
                 as Box<dyn AsyncRead + Send + Unpin>,
             Some("gzip") => Box::new(async_compression::tokio::bufread::GzipDecoder::new(r))
                 as Box<dyn AsyncRead + Send + Unpin>,