diff --git a/ext/parsekit/Cargo.lock b/ext/parsekit/Cargo.lock index 2ca165b..fff4e1e 100644 --- a/ext/parsekit/Cargo.lock +++ b/ext/parsekit/Cargo.lock @@ -286,7 +286,7 @@ dependencies = [ "log", "quick-xml 0.41.0", "serde", - "zip", + "zip 8.6.0", ] [[package]] @@ -567,7 +567,7 @@ dependencies = [ "serde_json", "smallvec", "thiserror", - "zip", + "zip 8.6.0", ] [[package]] @@ -1308,9 +1308,9 @@ checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" [[package]] name = "lzma-rust2" -version = "0.16.5" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca93e534d1142d1d0dcca6d25fe302508a5dfb40b302802904577725ea0b695b" +checksum = "fde178a3caf126c440fa15628147772d8ee590a39477d711353fbe2e58a73a5b" dependencies = [ "sha2", ] @@ -1435,6 +1435,18 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" +[[package]] +name = "nix" +version = "0.31.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf20d2fde8ff38632c426f1165ed7436270b44f199fc55284c38276f9db47c3d" +dependencies = [ + "bitflags", + "cfg-if", + "cfg_aliases", + "libc", +] + [[package]] name = "no_std_io2" version = "0.9.4" @@ -1561,7 +1573,7 @@ dependencies = [ "regex", "serde_json", "tesseract-rs", - "zip", + "zip 9.0.1", ] [[package]] @@ -2442,7 +2454,7 @@ dependencies = [ "libc", "reqwest", "thiserror", - "zip", + "zip 8.6.0", ] [[package]] @@ -3066,6 +3078,20 @@ name = "zip" version = "8.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d04a6b5381502aa6087c94c669499eb1602eb9c5e8198e534de571f7154809b" +dependencies = [ + "crc32fast", + "flate2", + "indexmap", + "memchr", + "typed-path", + "zopfli", +] + +[[package]] +name = "zip" +version = "9.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e49ade69c4434c55dd651d36fe05f38e0578db948b773cbc01c48c4b5e560692" dependencies = [ "aes", "bzip2", @@ -3078,6 +3104,7 @@ dependencies = [ "indexmap", "lzma-rust2", "memchr", + "nix", "pbkdf2", "ppmd-rust", "sha1", diff --git a/ext/parsekit/Cargo.toml b/ext/parsekit/Cargo.toml index 9871981..609a4fb 100644 --- a/ext/parsekit/Cargo.toml +++ b/ext/parsekit/Cargo.toml @@ -21,7 +21,7 @@ image = "0.25" # Image processing library (match rusty-tesseract's version) calamine = "0.36" # Excel parsing docx-rs = "0.4" # Word document parsing quick-xml = "0.42" # XML parsing -zip = "8.2" # ZIP archive handling for PPTX +zip = "9.0" # ZIP archive handling for PPTX serde_json = "1.0" # JSON parsing regex = "1.10" # Text parsing encoding_rs = "0.8" # Encoding detection diff --git a/ext/parsekit/src/parser.rs b/ext/parsekit/src/parser.rs index d9f3283..aa5d4e1 100644 --- a/ext/parsekit/src/parser.rs +++ b/ext/parsekit/src/parser.rs @@ -311,7 +311,10 @@ impl Parser { Err(_) => continue, }; - let name = file.name(); + let name = match file.name() { + Ok(n) => n.into_owned(), + Err(_) => continue, + }; // Match slide XML files (e.g., ppt/slides/slide1.xml) if name.starts_with("ppt/slides/slide") && name.ends_with(".xml") && !name.contains("_rels") { // Extract slide number from filename @@ -353,7 +356,10 @@ impl Parser { Err(_) => continue, }; - let name = file.name(); + let name = match file.name() { + Ok(n) => n.into_owned(), + Err(_) => continue, + }; // Match notes slide XML files if name.starts_with("ppt/notesSlides/notesSlide") && name.ends_with(".xml") && !name.contains("_rels") { let mut contents = String::new();