Fixes + clippy

This commit is contained in:
Daniel Edrisian
2025-08-25 09:46:32 -07:00
parent edf2402b95
commit c6d3203cf5
2 changed files with 4 additions and 5 deletions

View File

@@ -2,11 +2,10 @@ use std::path::PathBuf;
pub fn normalize_pasted_path(pasted: &str) -> Option<PathBuf> {
// file:// URL → filesystem path
if let Ok(url) = url::Url::parse(pasted) {
if url.scheme() == "file" {
if let Ok(url) = url::Url::parse(pasted)
&& url.scheme() == "file" {
return url.to_file_path().ok();
}
}
// shell-escaped single path → unescaped
let parts: Vec<String> = shlex::Shlex::new(pasted).collect();