fix: update magic cookie flags and default value
Co-authored-by: aider (openai/andrew/openrouter/anthropic/claude-sonnet-4) <aider@aider.chat>
This commit is contained in:
@@ -17,7 +17,7 @@ impl MagicMetaPlugin {
|
||||
MagicMetaPlugin {
|
||||
buffer: Vec::new(),
|
||||
meta_name: "magic_file_type".to_string(),
|
||||
cookie_flags: CookieFlags::NONE,
|
||||
cookie_flags: CookieFlags::empty(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ impl MetaPlugin for MagicMetaPlugin {
|
||||
let cookie = Cookie::open(self.cookie_flags)
|
||||
.map_err(|e| io::Error::new(io::ErrorKind::Other, format!("Failed to open magic cookie: {}", e)))?;
|
||||
|
||||
cookie.load(&Default::default())
|
||||
cookie.load(&[])
|
||||
.map_err(|e| io::Error::new(io::ErrorKind::Other, format!("Failed to load magic database: {}", e)))?;
|
||||
|
||||
let result = cookie.buffer(&self.buffer)
|
||||
|
||||
Reference in New Issue
Block a user