deps: zip 3.0.0 → 9.0.4 (RUSTSEC-2026-0367, -0368, -0369) (#1971)
Thanks @jyviko.
This commit is contained in:
1 parent
30ca43de7d
commit
c4d2ae87ee
6 files changed
+78
-136
No files matched your search
@@ -352,9 +352,9 @@ fn bad<T>(msg: impl Into<String>) -> Result<T> {
|
||||
|
||||
fn read_part(zip: &mut zip::ZipArchive<Cursor<&[u8]>>, name: &str) -> Result<Option<Vec<u8>>> {
|
||||
let want = name.trim_start_matches('/').to_ascii_lowercase();
|
||||
let Some(idx) =
|
||||
(0..zip.len()).find(|i| zip.name_for_index(*i).is_some_and(|n| n.replace('\\', "/").trim_start_matches('/').to_ascii_lowercase() == want))
|
||||
else {
|
||||
let Some(idx) = (0..zip.len()).find(|i| {
|
||||
zip.name_for_index(*i).and_then(|n| n.ok()).is_some_and(|n| n.replace('\\', "/").trim_start_matches('/').to_ascii_lowercase() == want)
|
||||
}) else {
|
||||
return Ok(None);
|
||||
};
|
||||
let mut f = zip.by_index(idx).map_err(|e| IoError::Invalid(format!("3MF {name}: {e}")))?;
|
||||
|
||||
Reference in new issue
Block a user