removing -r

This commit is contained in:
Michael Zhang 2020-04-18 14:22:24 -05:00
parent bfd6d55d2c
commit f17e08cd83
Signed by: michael
GPG key ID: BDA47A31A3C8EE6B
3 changed files with 7 additions and 7 deletions

2
Cargo.lock generated
View file

@ -69,7 +69,7 @@ dependencies = [
[[package]]
name = "garbage"
version = "0.2.0-rc4"
version = "0.2.0-rc5"
dependencies = [
"anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)",
"chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",

View file

@ -1,6 +1,6 @@
[package]
name = "garbage"
version = "0.2.0-rc4"
version = "0.2.0"
authors = ["Michael Zhang <iptq@protonmail.com>"]
description = "cli tool for interacting with the freedesktop trashcan"
license = "MIT"

View file

@ -38,9 +38,9 @@ pub struct PutOptions {
#[structopt(long = "prompt", short = "i")]
prompt: bool,
/// Trashes directories recursively
/// Trashes directories recursively (ignored)
#[structopt(long = "recursive", short = "r")]
recursive: bool,
_recursive: bool,
/// Suppress prompts/messages
#[structopt(long = "force", short = "f")]
@ -156,9 +156,9 @@ impl DeletionStrategy {
let link_info = target.read_link().ok();
// file is a directory
if !link_info.is_some() && target.is_dir() && !options.recursive {
bail!(Error::MissingRecursiveOption(target.to_path_buf()));
}
// if !link_info.is_some() && target.is_dir() && !options.recursive {
// bail!(Error::MissingRecursiveOption(target.to_path_buf()));
// }
let (trash_dir, requires_copy) = self.get_target_trash();