From d5378b9d8b5f887bf1b2f02063b5f9d6531de053 Mon Sep 17 00:00:00 2001 From: Kaporos Date: Sat, 11 Mar 2023 13:54:59 +0100 Subject: [PATCH] Fixing filename ending with space not found --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index ee6510f..e9fc244 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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::(); + let filename_normalized = filename.to_string_lossy().nfc().collect::().trim().to_string(); vault_contents.iter().find(|path| { let path_normalized_str = path.to_string_lossy().nfc().collect::();