diff --git a/src/common/mime_types.rs b/src/common/mime_types.rs index 62fcd26..4e5f7a8 100644 --- a/src/common/mime_types.rs +++ b/src/common/mime_types.rs @@ -29,6 +29,9 @@ impl TryFrom<&str> for MimeType { fn try_from(arg: &str) -> Result { if let Ok(url) = url::Url::parse(arg) { + if url.scheme() == "file" { + return Self::try_from(url.path()) + } Ok(Self( format!("x-scheme-handler/{}", url.scheme()) .parse::()