mirror of
https://github.com/chatmail/core.git
synced 2026-05-03 13:26:28 +03:00
Check extension of files in case-insensitive way
This commit is contained in:
committed by
holger krekel
parent
6beea86df7
commit
aa7a149560
@@ -299,7 +299,7 @@ pub fn dc_msg_guess_msgtype_from_suffix(path: &Path) -> Option<(Viewtype, &str)>
|
||||
"vcf" => (Viewtype::File, "text/vcard"),
|
||||
"vcard" => (Viewtype::File, "text/vcard"),
|
||||
};
|
||||
let extension = path.extension()?.to_str()?;
|
||||
let extension: &str = &path.extension()?.to_str()?.to_lowercase();
|
||||
|
||||
KNOWN.get(extension).map(|x| *x)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user