diff --git a/src/meta_plugin/magic.rs b/src/meta_plugin/magic.rs index 30984bd..ec46ebe 100644 --- a/src/meta_plugin/magic.rs +++ b/src/meta_plugin/magic.rs @@ -104,8 +104,8 @@ impl MetaPlugin for MagicFileMetaPlugin { // Store raw pointer to connection - unsafe but necessary for this design self.conn = Some(conn as *const _ as *mut Connection); - // Initialize magic cookie - let cookie = Cookie::open(CookieFlags::empty()) + // Initialize magic cookie with flags for comprehensive detection + let cookie = Cookie::open(CookieFlags::MIME_TYPE | CookieFlags::MIME_ENCODING) .map_err(|e| anyhow::anyhow!("Failed to open magic cookie: {}", e))?; cookie.load(&[] as &[&str]) .map_err(|e| anyhow::anyhow!("Failed to load magic database: {}", e))?;