From 4a01dd33e37558b34554d1331f16d1f71292ee1f Mon Sep 17 00:00:00 2001 From: Chris Hennick <4961925+Pr0methean@users.noreply.github.com> Date: Mon, 17 Jun 2024 18:55:01 -0700 Subject: [PATCH] ci(fuzz): Fix: would try to copy from nonexistent paths after merging with another archive --- fuzz/fuzz_targets/fuzz_write.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/fuzz/fuzz_targets/fuzz_write.rs b/fuzz/fuzz_targets/fuzz_write.rs index 1998332c..de8ed38e 100755 --- a/fuzz/fuzz_targets/fuzz_write.rs +++ b/fuzz/fuzz_targets/fuzz_write.rs @@ -44,10 +44,11 @@ pub struct FileOperation<'k> { impl <'k> FileOperation<'k> { fn get_path(&self) -> Cow { - if let BasicFileOperation::WriteDirectory(_) = self.basic { - Cow::Owned(self.path.join("/")) - } else { - Cow::Borrowed(&self.path) + match self.basic { + BasicFileOperation::WriteDirectory(_) => Cow::Owned(self.path.join("/")), + BasicFileOperation::MergeWithOtherFile { operations } => + operations[0].0.get_path(), + _ => Cow::Borrowed(&self.path) } } }