fix: add missing meta_name implementation and fix compilation errors
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
use anyhow::Result;
|
||||
use magic::{Cookie, CookieFlags};
|
||||
use rusqlite::Connection;
|
||||
use std::io;
|
||||
|
||||
use crate::common::PIPESIZE;
|
||||
@@ -128,14 +126,14 @@ impl MetaPlugin for MagicFileMetaPlugin {
|
||||
// Initialize the magic cookie once
|
||||
let cookie = match Cookie::open(Default::default()) {
|
||||
Ok(cookie) => cookie,
|
||||
Err(e) => {
|
||||
Err(_e) => {
|
||||
return crate::meta_plugin::MetaPluginResponse {
|
||||
metadata: Vec::new(),
|
||||
is_finalized: true,
|
||||
};
|
||||
}
|
||||
};
|
||||
if let Err(e) = cookie.load(&[] as &[&str]) {
|
||||
if let Err(_e) = cookie.load(&[] as &[&str]) {
|
||||
return crate::meta_plugin::MetaPluginResponse {
|
||||
metadata: Vec::new(),
|
||||
is_finalized: true,
|
||||
@@ -173,9 +171,10 @@ impl MetaPlugin for MagicFileMetaPlugin {
|
||||
}
|
||||
}
|
||||
|
||||
let is_finalized = !metadata.is_empty();
|
||||
crate::meta_plugin::MetaPluginResponse {
|
||||
metadata,
|
||||
is_finalized: !metadata.is_empty(),
|
||||
is_finalized,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user