From 4fc49b63cc4f5848322a55cde25a543d9a90e32d Mon Sep 17 00:00:00 2001 From: Nbiba Bedis Date: Tue, 16 Nov 2021 09:23:40 +0100 Subject: [PATCH] Assert that output_dir exists in decompress_fn as well --- src/commands.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/commands.rs b/src/commands.rs index 4605f02..17f6f7b 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -345,6 +345,7 @@ fn decompress_file( output_file_path: PathBuf, question_policy: QuestionPolicy, ) -> crate::Result<()> { + assert!(output_dir.exists()); let reader = fs::File::open(&input_file_path)?; // Zip archives are special, because they require io::Seek, so it requires it's logic separated // from decoder chaining.