1
0
Fork 0
mirror of synced 2024-04-25 16:22:07 +12:00

Remove warnings about non existent directories in Windows (#79)

This commit is contained in:
Rafał Mikrut 2020-10-21 16:44:09 -04:00 committed by GitHub
parent bbc1bc6c73
commit 4d90e3170e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 13 deletions

View file

@ -84,7 +84,7 @@ impl Directories {
continue;
}
if !directory.exists() {
text_messages.warnings.push(format!("Excluded Directory Warning: Provided folder path must exits, ignoring {}", directory.display()));
// text_messages.warnings.push(format!("Excluded Directory Warning: Provided folder path must exits, ignoring {}", directory.display()));
continue;
}
if !directory.is_dir() {

View file

@ -366,15 +366,14 @@ fn main() {
let current_dir: String = match env::current_dir() {
Ok(t) => t.to_str().unwrap().to_string(),
Err(_) => {
#[cfg(target_family = "unix")]
{
if cfg!(target_family = "unix") {
println!("Failed to read current directory, setting /home instead");
"/home".to_string()
}
#[cfg(target_family = "windows")]
{
} else if cfg!(target_family = "windows") {
println!("Failed to read current directory, setting C:\\ instead");
"C:\\".to_string()
} else {
"".to_string()
}
}
};
@ -408,13 +407,11 @@ fn main() {
}
// Set Excluded Items
{
#[cfg(target_family = "unix")]
{
entry_excluded_items.set_text("*/.git/,*/node_modules/,*/lost+found/");
if cfg!(target_family = "unix") {
entry_excluded_items.set_text("*/.git/*,*/node_modules/*,*/lost+found/*");
}
#[cfg(target_family = "windows")]
{
entry_excluded_items.set_text("*\\.git\\,*\\node_modules\\,*:\\Windows\\,:/Windows/");
if cfg!(target_family = "windows") {
entry_excluded_items.set_text("*/.git/*,*/node_modules/*,*/lost+found/*,*:/windows/*");
}
}
}
@ -912,7 +909,10 @@ fn main() {
for path_to_delete in vec_path_to_delete {
let mut vec_tree_path_to_delete: Vec<gtk::TreePath> = Vec::new();
let iter = list_store.get_iter_first().unwrap();
let iter = match list_store.get_iter_first() {
Some(t) => t,
None => break,
};
let mut take_child_mode = false; // When original image is searched one, we must remove all occurences of its children
let mut prepared_for_delete;
loop {