case-fold filenames for newly added media

This commit is contained in:
llama 2025-11-19 08:43:53 +08:00
parent 5efa5059d0
commit 667c21c593
No known key found for this signature in database
GPG key ID: 0B7543854B9413C3

View file

@ -173,7 +173,9 @@ pub fn add_data_to_folder_uniquely<'a, P>(
where
P: AsRef<Path>,
{
let normalized_name = normalize_filename(desired_name);
// case-fold when to account for case-insensitive filesystems
// but not within normalize_filename, for existing media refs
let normalized_name: Cow<_> = normalize_filename(desired_name).to_lowercase().into();
let mut target_path = folder.as_ref().join(normalized_name.as_ref());