diff --git a/src/main.rs b/src/main.rs index d940b44..7852064 100644 --- a/src/main.rs +++ b/src/main.rs @@ -28,9 +28,11 @@ struct ModFile { impl ModFile { #[inline] pub fn new_from_installer(file: FileType) -> Self { + let dest: PathBuf = file.destination.unwrap_or_default().into(); + ModFile { source: file.source.into(), - dest: file.destination.unwrap_or_default().into(), + dest: Self::path_to_lowercase(&dest), 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(