1
0
Fork 0
mirror of synced 2024-05-18 03:13:36 +12:00
This commit is contained in:
Rafał Mikrut 2023-12-19 17:04:19 +01:00
parent f9b8c1eb43
commit 4228f55bdc
3 changed files with 4 additions and 5 deletions

View file

@ -500,7 +500,7 @@ where
if dry_run {
infos.push(format!("dry_run - would delete file: {:?}", i.get_path()));
} else {
if let Err(e) = std::fs::remove_file(i.get_path()) {
if let Err(e) = fs::remove_file(i.get_path()) {
errors.push(format!("Cannot delete file: {:?} - {e}", i.get_path()));
failed_to_remove_files += 1;
} else {

View file

@ -305,8 +305,7 @@ impl Directories {
self.reference_directories.iter().any(|e| path.starts_with(e))
}
pub fn is_excluded(&self, path: impl AsRef<Path>) -> bool {
let path = path.as_ref();
pub fn is_excluded(&self, path: &Path) -> bool {
#[cfg(target_family = "windows")]
let path = normalize_windows_path(path);
// We're assuming that `excluded_directories` are already normalized

View file

@ -108,7 +108,7 @@ export component LeftSidePanel {
HorizontalLayout {
alignment: start;
Button {
enabled: GuiState.active_tab != CurrentTab.Settings && GuiState.available_subsettings;
visible: GuiState.active_tab != CurrentTab.Settings && GuiState.available_subsettings;
min-width: 20px;
min-height: 20px;
max-height: self.width;
@ -122,7 +122,7 @@ export component LeftSidePanel {
HorizontalLayout {
alignment: end;
Button {
enabled: GuiState.active_tab != CurrentTab.Settings;
visible: GuiState.active_tab != CurrentTab.Settings;
min-width: 20px;
min-height: 20px;
max-height: self.width;