diff --git a/src/cli/commands.rs b/src/cli/commands.rs index f128499..7c16e57 100644 --- a/src/cli/commands.rs +++ b/src/cli/commands.rs @@ -1113,6 +1113,9 @@ fn run_config(action: Option, config: &mut Config) -> Result<()> { } ConfigKey::MaxFileSize => { let size: u64 = value.parse().context("Invalid size")?; + if size == 0 { + anyhow::bail!("Max file size must be greater than 0"); + } config.set_max_file_size(size * 1024)?; format!("max_file_size = {} KB", size) }