Remove schema from x-scheme-handler/file files

This commit is contained in:
leiserfg 2020-10-06 22:06:21 +02:00
parent 9fe6980f86
commit fc8e2796ca

View file

@ -29,6 +29,9 @@ impl TryFrom<&str> for MimeType {
fn try_from(arg: &str) -> Result<Self> {
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::<Mime>()