mirror of
https://github.com/ankitects/anki.git
synced 2026-01-13 05:53:53 -05:00
case-fold filenames for newly added media
This commit is contained in:
parent
5efa5059d0
commit
667c21c593
1 changed files with 3 additions and 1 deletions
|
|
@ -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());
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue