From 48de16ca0d99b32314a9d47f636940a569a9189e Mon Sep 17 00:00:00 2001
From: Chris Hennick <4961925+Pr0methean@users.noreply.github.com>
Date: Thu, 9 May 2024 18:24:21 -0700
Subject: [PATCH] Chore: fix bug: file_name is needed for insert_file_data

---
 src/write.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/write.rs b/src/write.rs
index 19371557..6a57cc19 100644
--- a/src/write.rs
+++ b/src/write.rs
@@ -796,7 +796,7 @@ impl<W: Write + Seek> ZipWriter<W> {
                 crc32: raw_values.crc32,
                 compressed_size: raw_values.compressed_size,
                 uncompressed_size: raw_values.uncompressed_size,
-                file_name: "".into(), // Never used for saving
+                file_name: name.into(), // Never used for saving
                 file_name_raw: name.into().bytes().collect(),
                 extra_field,
                 central_extra_field: options.extended_options.central_extra_data().cloned(),
@@ -2183,7 +2183,7 @@ mod test {
         path.push(".");
         path.push("system32");
         let path_str = super::path_to_string(&path);
-        assert_eq!(&*path_str, "windows/system32");
+        assert_eq!(&*path_str, "system32");
     }
 
     #[test]