added path lowercase to ModFile

This commit is contained in:
2026-02-28 22:26:20 +01:00
parent bc424087a2
commit 77f80ca23d

View File

@@ -28,9 +28,11 @@ struct ModFile {
impl ModFile { impl ModFile {
#[inline] #[inline]
pub fn new_from_installer(file: FileType) -> Self { pub fn new_from_installer(file: FileType) -> Self {
let dest: PathBuf = file.destination.unwrap_or_default().into();
ModFile { ModFile {
source: file.source.into(), source: file.source.into(),
dest: file.destination.unwrap_or_default().into(), dest: Self::path_to_lowercase(&dest),
internal_priority: file.priority.unwrap_or(0), internal_priority: file.priority.unwrap_or(0),
} }
} }
@@ -61,6 +63,10 @@ impl ModFile {
} }
} }
} }
fn path_to_lowercase(path: &Path) -> PathBuf {
PathBuf::from(path.to_string_lossy().to_lowercase())
}
} }
pub fn walk_files_recursive( pub fn walk_files_recursive(