From 3a8cc9edda1045ab690d859cf73ed763c732cafd Mon Sep 17 00:00:00 2001 From: valoq Date: Sat, 12 Jul 2025 18:26:29 +0200 Subject: [PATCH] fix subcommand --- src/cli/args.rs | 3 ++- src/commands/list.rs | 2 +- src/main.rs | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cli/args.rs b/src/cli/args.rs index dde09ad..bf31e5e 100644 --- a/src/cli/args.rs +++ b/src/cli/args.rs @@ -108,7 +108,7 @@ pub enum Subcommand { /// Disable Smart Unpack #[arg(long)] no_smart_unpack: bool, - + /// Mark sandbox as disabled #[arg(long, global = true)] disable_sandbox: bool, @@ -280,6 +280,7 @@ mod tests { fast: false, slow: false, follow_symlinks: false, + disable_sandbox: true, }, format: Some("tar.gz".into()), ..mock_cli_args() diff --git a/src/commands/list.rs b/src/commands/list.rs index 7dd956e..3461b15 100644 --- a/src/commands/list.rs +++ b/src/commands/list.rs @@ -11,7 +11,7 @@ use crate::{ commands::warn_user_about_loading_zip_in_memory, extension::CompressionFormat::{self, *}, list::{self, FileInArchive, ListOptions}, - utils::{io::lock_and_flush_output_stdio, user_wants_to_continue, landlock}, + utils::{io::lock_and_flush_output_stdio, landlock, user_wants_to_continue}, QuestionAction, QuestionPolicy, BUFFER_CAPACITY, }; diff --git a/src/main.rs b/src/main.rs index f282dcf..927e309 100644 --- a/src/main.rs +++ b/src/main.rs @@ -48,7 +48,6 @@ fn run() -> Result<()> { //let working_dir = args.output_dir // .clone() // .unwrap_or_else(|| env::current_dir().unwrap_or_default()); - // restrict filesystem access to working_dir; // 1. working_dir is either the output_dir specified by the -d option or // 2. it is the temporary .tmp-ouch-XXXXXX directory that is renamed after decompression