(reader: impl Read, dest: &Path)
| 3816 | } |
| 3817 | |
| 3818 | fn extract_tar_reader_to_dir(reader: impl Read, dest: &Path) -> Result<(), String> { |
| 3819 | let mut archive = tar::Archive::new(reader); |
| 3820 | archive |
| 3821 | .unpack(dest) |
| 3822 | .map_err(|err| format!("extract layer into {}: {err}", dest.display())) |
| 3823 | } |
| 3824 | |
| 3825 | // `media_type` is an OCI media type string (e.g. `application/vnd.oci.image.layer.v1.tar+gzip`), |
| 3826 | // not a filesystem path, so case-sensitive comparison is correct. |
no outgoing calls
no test coverage detected