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:
Andrew Phillips
2025-08-26 18:05:02 -03:00
parent 1f82be1f02
commit 3fb436dc44
8 changed files with 18 additions and 24 deletions

View File

@@ -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,
}
}