Fixing filename ending with space not found

This commit is contained in:
Kaporos 2023-03-11 13:54:59 +01:00
parent 80130260e9
commit d5378b9d8b

View File

@ -719,7 +719,7 @@ fn lookup_filename_in_vault<'a>(
vault_contents: &'a [PathBuf],
) -> Option<&'a PathBuf> {
let filename = PathBuf::from(filename);
let filename_normalized = filename.to_string_lossy().nfc().collect::<String>();
let filename_normalized = filename.to_string_lossy().nfc().collect::<String>().trim().to_string();
vault_contents.iter().find(|path| {
let path_normalized_str = path.to_string_lossy().nfc().collect::<String>();