Skip to content

Commit 4be6e7d

Browse files
committed
feat: hide some useless files in zip preview
1 parent a27e200 commit 4be6e7d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

check-cmt/src/main.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,15 @@ fn build_tree(zip_path: &str) -> Result<Vec<FileNode>, anyhow::Error> {
335335
if parts.is_empty() {
336336
continue;
337337
}
338+
if parts[0] == "__MACOSX" {
339+
continue;
340+
}
341+
if parts
342+
.iter()
343+
.any(|part| part.starts_with('.') || part.starts_with("~$"))
344+
{
345+
continue;
346+
}
338347

339348
let mut current_children = &mut root_children;
340349
for (index, part) in parts.iter().enumerate() {

0 commit comments

Comments
 (0)