chore: rename FILES_TO_IGNORE to PATHS_TO_IGNORE

This commit is contained in:
Jesús Pérex 2025-05-25 00:19:03 +01:00
parent 6c0ecb402c
commit db778cab51
2 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
use crate::tools; use crate::tools;
use crate::{FILES_TO_CONVERT, FILES_TO_COPY, FILES_TO_IGNORE}; use crate::{FILES_TO_CONVERT, FILES_TO_COPY, PATHS_TO_IGNORE};
use std::collections::HashSet; use std::collections::HashSet;
use std::fs; use std::fs;
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
@ -68,7 +68,7 @@ impl DirectoryProcessor {
// Check if path should be ignored (both files and directories) // Check if path should be ignored (both files and directories)
if let Some(name) = path.file_name().and_then(|n| n.to_str()) { if let Some(name) = path.file_name().and_then(|n| n.to_str()) {
if FILES_TO_IGNORE.iter().any(|&ignore| name.contains(ignore)) { if PATHS_TO_IGNORE.iter().any(|&ignore| name.contains(ignore)) {
is_empty = false; is_empty = false;
continue; continue;
} }

View File

@ -10,7 +10,7 @@ pub const FILES_TO_COPY: [&str; 10] = [
"jpg", "jpeg", "png", "gif", "bmp", "tiff", "webp", "avif", "txt", "md", "jpg", "jpeg", "png", "gif", "bmp", "tiff", "webp", "avif", "txt", "md",
]; ];
pub const FILES_TO_CONVERT: [&str; 3] = ["odt", "doc", "docx"]; pub const FILES_TO_CONVERT: [&str; 3] = ["odt", "doc", "docx"];
pub const FILES_TO_IGNORE: [&str; 5] = [".DS_Store", ".syncthing", ".sync-conflict-", ".stfolder", ".stversions"]; pub const PATHS_TO_IGNORE: [&str; 5] = [".DS_Store", ".syncthing", ".sync-conflict-", ".stfolder", ".stversions"];
#[derive(Parser, Debug)] #[derive(Parser, Debug)]
#[command( #[command(