diff --git a/src/main.rs b/src/main.rs index f8d2e31b..94c0cfc6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -56,6 +56,14 @@ fn main() { .value_name("level") .value_parser(["0", "1", "2", "3", "4", "5", "6", "max"]), ) + .arg( + Arg::new("backup") + .help("Back up modified files") + .short('b') + .long("backup") + .hide(true) + .action(ArgAction::SetTrue), + ) .arg( Arg::new("recursive") .help("Recurse into subdirectories and optimize all *.png/*.apng files") @@ -285,6 +293,11 @@ Heuristic filter selection strategies: ) .get_matches_from(std::env::args()); + if matches.get_flag("backup") { + eprintln!("The --backup flag is no longer supported. Please use --out or --dir to preserve your existing files."); + exit(1) + } + let (out_file, out_dir, opts) = match parse_opts_into_struct(&matches) { Ok(x) => x, Err(x) => {