diff --git a/mediarepo-api/src/tauri_plugin/commands/file.rs b/mediarepo-api/src/tauri_plugin/commands/file.rs index ffb1cc8..538c92f 100644 --- a/mediarepo-api/src/tauri_plugin/commands/file.rs +++ b/mediarepo-api/src/tauri_plugin/commands/file.rs @@ -175,9 +175,7 @@ async fn resolve_subdir(entry: DirEntry) -> PluginResult> { /// metadata for it #[tracing::instrument(level = "trace")] async fn retrieve_file_information(path: PathBuf) -> PluginResult { - let mime = mime_guess::from_path(&path) - .first() - .ok_or_else(|| format!("Could not guess mime for file {:?}", path))?; + let mime = mime_guess::from_path(&path).first(); let metadata = fs::metadata(&path).await?; let creation_time = metadata.created()?; let change_time = metadata.modified()?; @@ -188,7 +186,7 @@ async fn retrieve_file_information(path: PathBuf) -> PluginResult, pub creation_time: NaiveDateTime, pub change_time: NaiveDateTime, }