diff --git a/repo-manifest/src/scan.rs b/repo-manifest/src/scan.rs index 10f3f46..7859e9f 100644 --- a/repo-manifest/src/scan.rs +++ b/repo-manifest/src/scan.rs @@ -74,6 +74,19 @@ fn is_iso(entry: &DirEntry) -> bool { .unwrap_or(false) } +#[inline] +fn is_preview(entry: &DirEntry) -> bool { + entry + .path() + .parent() + .is_some_and(|p| p.ends_with("preview")) +} + +#[inline] +fn not_a_preview_iso(entry: &DirEntry) -> bool { + is_iso(entry) && (!is_preview(entry)) +} + /// Calculate the Sha256 checksum of the given stream pub fn sha256sum(mut reader: R) -> Result { let mut hasher = Sha256::new(); @@ -135,7 +148,7 @@ pub fn collect_tarballs>(root: P) -> Result> { } pub fn collect_iso>(root: P) -> Result> { - collect_files(root, is_iso) + collect_files(root, not_a_preview_iso) } pub fn increment_scan_files(