From 1c52dc5ee41d4da31adcced758ffd223ae69345c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Marcos=20Bezerra?= Date: Mon, 15 Nov 2021 13:05:46 -0300 Subject: [PATCH] Assert that output_dir exists --- src/commands.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/commands.rs b/src/commands.rs index dfb9bbb..4605f02 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -526,6 +526,7 @@ fn smart_unpack( output_file_path: &Path, question_policy: QuestionPolicy, ) -> crate::Result>> { + assert!(output_dir.exists()); let temp_dir = tempfile::tempdir_in(output_dir)?; let temp_dir_path = temp_dir.path(); info!("Created temporary directory {} to hold decompressed elements.", nice_directory_display(temp_dir_path));