Skip to content

Commit

Permalink
KPS
Browse files Browse the repository at this point in the history
  • Loading branch information
qarmin committed Oct 15, 2023
1 parent 8460f29 commit 8ffcb2f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions czkawka_core/src/common_directory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ impl Directories {
pub fn set_reference_directory(&mut self, reference_directory: &[PathBuf]) -> Messages {
let mut messages: Messages = Messages::new();

dbg!("Before", &self.reference_directories);
self.reference_directories = reference_directory
.iter()
.filter_map(|directory| {
Expand All @@ -36,12 +37,14 @@ impl Directories {
})
.collect::<Vec<PathBuf>>();

dbg!("After", &self.reference_directories);
messages
}

pub fn set_included_directory(&mut self, included_directory: Vec<PathBuf>) -> Messages {
let mut messages: Messages = Messages::new();

dbg!("Before", &self.included_directories);
if included_directory.is_empty() {
messages.errors.push(flc!("core_missing_no_chosen_included_directory"));
return messages;
Expand All @@ -67,12 +70,14 @@ impl Directories {

self.included_directories = checked_directories;

dbg!("After", &self.included_directories);
messages
}

pub fn set_excluded_directory(&mut self, excluded_directory: Vec<PathBuf>) -> Messages {
let mut messages: Messages = Messages::new();

dbg!("Before", &self.excluded_directories);
if excluded_directory.is_empty() {
return messages;
}
Expand All @@ -97,6 +102,7 @@ impl Directories {
}
self.excluded_directories = checked_directories;

dbg!("After", &self.excluded_directories);
messages
}

Expand Down

0 comments on commit 8ffcb2f

Please sign in to comment.