diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/manifest.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/manifest.rs b/src/manifest.rs index ed326e1..307913e 100644 --- a/src/manifest.rs +++ b/src/manifest.rs @@ -157,7 +157,7 @@ fn collect_files(rootfs: &Path) -> Result<Vec<FileRecord>> { for entry in WalkDir::new(rootfs).follow_links(false).min_depth(1) { let entry = entry.with_context(|| format!("walk rootfs {}", rootfs.display()))?; let relative = entry.path().strip_prefix(rootfs).expect("walk entry is below rootfs"); - if relative.components().next().is_some_and(|part| part.as_os_str() == ".host" || part.as_os_str() == ".fakedata") { + if is_internal_metadata_path(&portable_path(relative)?) { continue; } let path = portable_path(relative)?; @@ -301,7 +301,7 @@ fn is_enabled_service(path: &str) -> bool { } fn is_internal_metadata_path(path: &str) -> bool { - matches!(path.split('/').next(), Some(".host" | ".fakedata")) + path.split('/').any(|component| matches!(component, ".host" | ".fakedata")) } fn is_archive_root_path(path: &str) -> bool { |