diff --git a/server/src/repo/package.rs b/server/src/repo/package.rs index 70466ba..996f933 100644 --- a/server/src/repo/package.rs +++ b/server/src/repo/package.rs @@ -13,8 +13,6 @@ use libarchive::{ }; use sea_orm::ActiveValue::Set; -const IGNORED_FILES: [&str; 5] = [".BUILDINFO", ".INSTALL", ".MTREE", ".PKGINFO", ".CHANGELOG"]; - #[derive(Debug, Clone)] pub struct Package { pub path: PathBuf, @@ -158,11 +156,9 @@ impl Package { let entry = entry?; let path_name = entry.pathname(); - if !IGNORED_FILES.iter().any(|p| p == &path_name) { + if !path_name.starts_with('.') { files.push(PathBuf::from(path_name)); - } - - if path_name == ".PKGINFO" { + } else if path_name == ".PKGINFO" { info = Some(PkgInfo::parse(entry)?); } }