fix(package): ignore all files that start with a dot
parent
e3b0f4f0a1
commit
86ab143271
|
@ -13,8 +13,6 @@ use libarchive::{
|
||||||
};
|
};
|
||||||
use sea_orm::ActiveValue::Set;
|
use sea_orm::ActiveValue::Set;
|
||||||
|
|
||||||
const IGNORED_FILES: [&str; 5] = [".BUILDINFO", ".INSTALL", ".MTREE", ".PKGINFO", ".CHANGELOG"];
|
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct Package {
|
pub struct Package {
|
||||||
pub path: PathBuf,
|
pub path: PathBuf,
|
||||||
|
@ -158,11 +156,9 @@ impl Package {
|
||||||
let entry = entry?;
|
let entry = entry?;
|
||||||
let path_name = entry.pathname();
|
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));
|
files.push(PathBuf::from(path_name));
|
||||||
}
|
} else if path_name == ".PKGINFO" {
|
||||||
|
|
||||||
if path_name == ".PKGINFO" {
|
|
||||||
info = Some(PkgInfo::parse(entry)?);
|
info = Some(PkgInfo::parse(entry)?);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue