Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.1.9] - 2025

### Fixed
- **Critical ignore flag bug**: Fixed issue where `-i, --ignore` flag was not functioning correctly, causing errors while trying to ingore them while using `rmxt` commands

### Changed
- Imporved different cases handling in the ignore flag logic with match block

### Added

## [0.1.9] - 2025-09-01

### Fixed
Expand Down
20 changes: 14 additions & 6 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,24 +260,32 @@ All the contents from the trash more then {days} days will be deleted permanentl
continue;
}

match (ignore, path.is_dir(), path.is_file()) {
(true, true, _) => {
match (ignore, dir, path.is_dir(), path.is_file(), recursive) {
(true, false, true, _, true) => {
if let Err(e) = fs::remove_dir_all(&path) {
eprintln!(
"{}",
format!("Error deleting with out moving to trash: {e}").red()
format!("Error deleting without moving to trash: {e}").red()
)
}
}
(true, false, true) => {
(true, true, true, _, false) => {
if let Err(e) = fs::remove_dir(&path) {
eprintln!(
"{}",
format!("Error deleting without moving to trash: {e}").red()
)
}
}
(true, _, false, true, _) => {
if let Err(e) = fs::remove_file(&path) {
eprintln!(
"{}",
format!("Error deleting with out moving to trash: {e}").red()
format!("Error deleting without moving to trash: {e}").red()
)
}
}
(false, _, _) => {
(false, _, _, _, _) => {
if let Err(e) = delete(&path) {
eprintln!("{}", format!("Error moving to trash: {e}").red());
}
Expand Down
Loading