* Normalize extension list from main (includes ADDITIONAL_FILE_TYPES_CATALOG selections: .obj, .step, .stp, …). * Used for both directory-queue filtering and processFile / ZIP entry matching so behavior stays consistent.
(scanExtensions)
| 169 | * Used for both directory-queue filtering and processFile / ZIP entry matching so behavior stays consistent. |
| 170 | */ |
| 171 | /** macOS ZIP junk: __MACOSX folder entries and AppleDouble (._*) resource forks */ |
| 172 | function isMacOsJunkZipEntry(entryPath) { |
| 173 | if (!entryPath) return false; |
| 174 | const normalized = entryPath.replace(/\\/g, '/'); |
| 175 | if (normalized.split('/').some((seg) => seg.toLowerCase() === '__macosx')) return true; |
| 176 | const base = path.basename(entryPath); |
| 177 | return base.startsWith('._'); |
| 178 | } |
| 179 | |
| 180 | function buildScanExtensionSet(scanExtensions) { |
| 181 | const set = new Set(); |
| 182 | const add = (raw) => { |
| 183 | if (raw == null || raw === '') return; |
| 184 | const s = String(raw).trim().toLowerCase(); |
| 185 | if (!s) return; |
| 186 | set.add(s.startsWith('.') ? s : `.${s}`); |
| 187 | }; |
no test coverage detected