From 47a07fb964d67efc4828bc83bb8b140a3ac6ea08 Mon Sep 17 00:00:00 2001 From: Chris Hennick <4961925+Pr0methean@users.noreply.github.com> Date: Wed, 15 May 2024 15:32:08 -0700 Subject: [PATCH] chore: Fix another error-type conversion error --- src/read.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/read.rs b/src/read.rs index 21966b55..d5502932 100644 --- a/src/read.rs +++ b/src/read.rs @@ -935,9 +935,7 @@ fn try_utf8_to_os_string(utf8_bytes: Vec) -> Result { #[cfg(windows)] fn try_utf8_to_os_string(utf8_bytes: Vec) -> Result { - Ok(OsString::from(String::from_utf8(utf8_bytes).map_err( - |_| ZipError::InvalidArchive("Invalid UTF-8 in symlink target"), - ))) + Ok(OsString::from(String::from_utf8(utf8_bytes)?)) } const fn unsupported_zip_error(detail: &'static str) -> ZipResult {