Repository navigation
feat: exclude Mac metadata with optional Windows filename checks - #319
athousanddetails wants to merge 2 commits into
Conversation
📝 Walkthrough
Merge Risk: 🔵 Low · up to The documentation placement is misleading but does not affect archive behavior. The change is mergeable with this minor cleanup left to the owner. Pre-merge checks |
|
There was a problem hiding this comment.
🔇 Additional comments (9)
Modules/Sources/Swift7zip/CompressionOptions.swift (1)
157-163: LGTM!Also applies to: 180-182, 196-197
Modules/Sources/Core/Settings/ArchiveSaveOptions.swift (1)
172-183: LGTM!Modules/Sources/Core/ArchiveSaver.swift (1)
70-70: LGTM!Modules/Tests/CoreTests/MacMetadataOptionsTests.swift (1)
1-100: LGTM!Modules/Tests/CoreTests/WindowsArchiveNamesTests.swift (1)
1-99: LGTM!Modules/Sources/Swift7zip/SevenZipWriter.swift (1)
55-55: LGTM!Also applies to: 95-95, 154-158, 168-174, 226-254, 260-262, 299-303, 312-316, 330-369
Modules/Sources/Swift7zip/WindowsArchiveNames.swift (1)
1-49: LGTM!MacPacker/Features/Settings/GeneralSettingsView.swift (1)
126-138: 📐 Maintainability & Code QualityThe catalog already contains all four new literals, so the proposed review comment is not supported.
Modules/Sources/Core/AppStorageKeys.swift (1)
72-74: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value
⚠️ Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.Fix the misplaced doc comments.
The
.DS_Storedoc comment on lines 70-71 now sits aboveexcludeMacMetadata, not abovesaveOptionsExcludeDSStore. The new comment on line 72 also documents onlyexcludeMacMetadata. Move the new keys above the.DS_Storecomment.♻️ Proposed fix
- /// Leave `.DS_Store` files out of archives. Off by default, as in Finder's - /// own Compress. /// Global compression choice, shared by saves, Quick Compress and Finder actions. public static let excludeMacMetadata = "excludeMacMetadata" public static let requireWindowsCompatibleNames = "requireWindowsCompatibleNames" + /// Leave `.DS_Store` files out of archives. Off by default, as in Finder's + /// own Compress. public static let saveOptionsExcludeDSStore = "saveOptionsExcludeDSStore"
ℹ️ Review info
⚙️ Run configuration
- Configuration used: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
48290892-e8d1-4690-97f6-76938f7d79c0
📒 Files selected for processing (10)
MacPacker/Features/Settings/GeneralSettingsView.swiftMacPacker/Localizable.xcstringsModules/Sources/Core/AppStorageKeys.swiftModules/Sources/Core/ArchiveSaver.swiftModules/Sources/Core/Settings/ArchiveSaveOptions.swiftModules/Sources/Swift7zip/CompressionOptions.swiftModules/Sources/Swift7zip/SevenZipWriter.swiftModules/Sources/Swift7zip/WindowsArchiveNames.swiftModules/Tests/CoreTests/MacMetadataOptionsTests.swiftModules/Tests/CoreTests/WindowsArchiveNamesTests.swift
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.
What & why
Adds an opt-in Exclude Mac-specific metadata setting for compression and archive saves. It leaves out
.DS_Store, AppleDouble metadata, resource forks and Finder metadata while preserving ordinary files with sidecar-like names. The default continues preserving metadata.A nested, opt-in Windows-compatible filenames setting rejects unsupported names and case/file-folder collisions before writing, listing the affected entries without renaming anything. It checks new, kept and renamed entries. This is a filename check, not a guarantee about Windows codecs, symbolic links or the destination's total path length.
Addresses the metadata-setting portion of #236. This PR deliberately does not add the proposed “Compress for Windows” Finder action or automatic normalization, so it does not automatically close the broader issue. No versions or vendored submodules changed.
How it was verified
The string catalog is committed as generated by Xcode tooling, including locale-tag normalization and formatting; no translations were hand-edited there.
Review follow-up: added translator context to the Windows filename setting and now checks generated Mac metadata paths for case-insensitive collisions before writing. Both review threads are resolved.
Changelog
The first changelog block is
1.0.0, already tagged asv1.0.0. PerAGENTS.md, a new block is needed; no version is chosen here. The contributor approved the English title before these translations were prepared. Full item for the next block:{ "type": "feat", "title": { "en": "Exclude Mac-specific metadata", "de": "Mac-spezifische Metadaten ausschließen", "es-MX": "Excluir metadatos específicos de Mac", "fa": "حذف فرادادههای مخصوص Mac", "fr": "Exclure les métadonnées propres au Mac", "it": "Escludi i metadati specifici del Mac", "ja": "Mac固有のメタデータを除外", "ko": "Mac 전용 메타데이터 제외", "nl": "Mac-specifieke metadata uitsluiten", "pl": "Pomijanie metadanych specyficznych dla Maca", "pt-BR": "Excluir metadados específicos do Mac", "ru": "Исключение метаданных Mac", "tr": "Mac’e özgü meta verileri hariç tut", "uk": "Виключення метаданих Mac", "vi": "Loại bỏ siêu dữ liệu dành riêng cho Mac", "zh-Hans": "排除 Mac 专属元数据" }, "issues": [ "236" ] }Checklist
AGENTS.mdSummary by CodeRabbit