Skip to content

Commit

Permalink
Ignore hidden files when cleaning data (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrHedmad authored Oct 14, 2024
2 parents cffddd3 + 3155efe commit 7fcf3c5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ Possible sections are "Added", "Changed", "Deprecated", "Removed", "Fixed" and
Versions are listed in reverse chronological order, with the most recent at
the top. Non pre-release versions sometimes have an associated name.

## [Unreleased]
## Unreleased
### Fixed
- `kerblam data clean` now no longer deletes hidden files (starting with a dot),
like `.gitignore` files in data directories.

## [v1.1.0] - 2024-09-26

### New
- `kerblam new` now creates additional gitignore files in the data folder to
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kerblam"
version = "1.0.0"
version = "1.1.0"
edition = "2021"
repository = "https://github.com/MrHedmad/kerblam"
license = "MIT"
Expand Down
4 changes: 4 additions & 0 deletions src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,10 @@ impl KerblamTomlOptions {
.collect(),
]
.concat()
.into_iter()
// Get rid of hidden files - we ignore them like a good little program should.
.filter(|x| !x.file_name().unwrap().to_string_lossy().starts_with("."))
.collect()
}

/// Return all files that are deemed 'precious'
Expand Down

0 comments on commit 7fcf3c5

Please sign in to comment.