This commit is contained in:
Mikayla Maki 2023-07-19 11:10:01 -07:00
parent f4413b0969
commit e3f9a01f6b
No known key found for this signature in database

View file

@ -44,14 +44,14 @@ impl FileAssociations {
let this = cx.has_global::<Self>().then(|| cx.global::<Self>())?; let this = cx.has_global::<Self>().then(|| cx.global::<Self>())?;
iife!({ iife!({
let suffix = let suffix = path
path.file_name() .file_name()
.and_then(|os_str| os_str.to_str()) .and_then(|os_str| os_str.to_str())
.and_then(|file_name| { .and_then(|file_name| {
file_name file_name
.find('.') .find('.')
.and_then(|dot_index| file_name.get(dot_index + 1..)) .and_then(|dot_index| file_name.get(dot_index + 1..))
} )?; })?;
this.suffixes this.suffixes
.get(suffix) .get(suffix)