Skip to content

Commit

Permalink
Add more excluded items to windows default settings
Browse files Browse the repository at this point in the history
  • Loading branch information
qarmin committed Oct 7, 2023
1 parent e976d40 commit 1ad7015
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
9 changes: 8 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
## Version 6.1.0 - ?

- BREAKING CHANGE - Changed cache saving method, deduplicated, optimized and simplified procedure - [#1072](https://github.com/qarmin/czkawka/pull/1072)
- Remove up to 170ms of delay after ending scan - [#1070](https://github.com/qarmin/czkawka/pull/1070)
- Added logger with useful info when debugging app (level can be adjusted via e.g. `RUST_LOG=debug` env) - [#1072](https://github.com/qarmin/czkawka/pull/1072), [#1070](https://github.com/qarmin/czkawka/pull/1070)
- Core code cleanup - [#1072](https://github.com/qarmin/czkawka/pull/1072), [#1070](https://github.com/qarmin/czkawka/pull/1070)
- Updated list of bad extensions and support for finding invalid jar files - [#1070](https://github.com/qarmin/czkawka/pull/1070)
- Fix Windows gui crashes by using gtk 4.6 instead 4.8 or 4.10 - [#992](https://github.com/qarmin/czkawka/pull/992)
- Fixed printing info about duplicated music files - [#1016](https://github.com/qarmin/czkawka/pull/1016)
- Fixed printing info about duplicated video files - [#1017](https://github.com/qarmin/czkawka/pull/1017)

## Version 6.0.0 - 11.06.2023r
- Add finding similar audio files by content - [#970](https://github.com/qarmin/czkawka/pull/970)
Expand Down
12 changes: 6 additions & 6 deletions czkawka_core/src/common_items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ use std::path::Path;

use crate::common::Common;

#[cfg(target_family = "unix")]
pub const DEFAULT_EXCLUDED_ITEMS: &str = "*/.git/*,*/node_modules/*,*/lost+found/*,*/Trash/*,*/.Trash-*/*,*/snap/*,/home/*/.cache/*";
#[cfg(not(target_family = "unix"))]
pub const DEFAULT_EXCLUDED_ITEMS: &str = "*\\.git\\*,*\\node_modules\\*,*\\lost+found\\*,*:\\windows\\*,*:\\$RECYCLE.BIN\\*,*:\\$SysReset\\*,*:\\System Volume Information\\*,*:\\OneDriveTemp\\*,*:\\hiberfil.sys,*:\\pagefile.sys,*:\\swapfile.sys";

#[derive(Debug, Clone, Default)]
pub struct ExcludedItems {
pub items: Vec<String>,
Expand Down Expand Up @@ -35,12 +40,7 @@ impl ExcludedItems {
let expression = expression.replace("/", "\\");

if expression == "DEFAULT" {
if cfg!(target_family = "unix") {
checked_expressions.push("*/.git/*,*/node_modules/*,*/lost+found/*,*/Trash/*,*/.Trash-*/*,*/snap/*,/home/*/.cache/*".to_string());
}
if cfg!(target_family = "windows") {
checked_expressions.push("*\\.git\\*,*\\node_modules\\*,*\\lost+found\\*,*:\\windows\\*".to_string());
}
checked_expressions.push(DEFAULT_EXCLUDED_ITEMS.to_string());
continue;
}
if !expression.contains('*') {
Expand Down
6 changes: 1 addition & 5 deletions czkawka_gui/src/saving_loading.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use gtk4::{ComboBoxText, ScrolledWindow, TextView, TreeView};

use czkawka_core::common::get_default_number_of_threads;
use czkawka_core::common_dir_traversal::CheckingMethod;
use czkawka_core::common_items::DEFAULT_EXCLUDED_ITEMS;
use czkawka_core::similar_images::SIMILAR_VALUES;

use crate::flg;
Expand Down Expand Up @@ -60,11 +61,6 @@ const DEFAULT_SIMILAR_VIDEOS_IGNORE_SAME_SIZE: bool = false;
pub const DEFAULT_MINIMAL_FILE_SIZE: &str = "16384";
pub const DEFAULT_MAXIMAL_FILE_SIZE: &str = "999999999999";

#[cfg(target_family = "unix")]
const DEFAULT_EXCLUDED_ITEMS: &str = "*/.git/*,*/node_modules/*,*/lost+found/*,*/Trash/*,*/.Trash-*/*,*/snap/*,/home/*/.cache/*";
#[cfg(not(target_family = "unix"))]
const DEFAULT_EXCLUDED_ITEMS: &str = "*\\.git\\*,*\\node_modules\\*,*\\lost+found\\*,*:\\windows\\*";

#[cfg(target_family = "unix")]
const DEFAULT_EXCLUDED_DIRECTORIES: &[&str] = &["/proc", "/dev", "/sys", "/run", "/snap"];
#[cfg(not(target_family = "unix"))]
Expand Down

0 comments on commit 1ad7015

Please sign in to comment.