Ignore macOS AppleDouble/.DS_Store files when scanning projects (#68)#69
Draft
hatton wants to merge 1 commit into
Draft
Ignore macOS AppleDouble/.DS_Store files when scanning projects (#68)#69hatton wants to merge 1 commit into
hatton wants to merge 1 commit into
Conversation
On non-HFS volumes (external SSDs, exFAT/FAT, network shares) macOS creates
AppleDouble sidecar files named "._<name>" plus ".DS_Store". These are binary,
not XML. lameta scanned them as project content: e.g. it found the AppleDouble
companion of a "foo.jpg.meta" file ("._foo.jpg.meta") and parsed it as XML,
producing "Non-whitespace before first tag." and failing to open the project.
Add isMacOSMetadataFile() and filter these files out at every scan site:
- getAllFilesSync() (folder child-file scan, ProjectDocuments)
- FolderMetadataFile metadata-file fallback (don't rename a "._Foo.session"
AppleDouble into place as the real metadata file)
- Folder.runSanityCheck() (avoid spurious "multiple project files" warning)
- Folder.findZombieMetadataFiles() (same rename-into-place hazard)
Fixes #68
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Member
Author
|
[Claude Opus 4.8] Consulted Devin on 2026-07-16 up to commit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[Claude Opus 4.8]
Problem
Fixes #68. When a lameta project is copied to a non-HFS+ volume — an external SSD, an exFAT/FAT drive, or a network share — macOS creates AppleDouble sidecar files named
._<originalname>(to preserve resource forks / xattrs) plus.DS_Store. These are binary, not XML.lameta scanned them as project content. The reported failure: for a described file
foo.jpgwith itsfoo.jpg.meta, macOS also created._foo.jpgand._foo.jpg.meta. During folder scanning,._foo.jpgwas treated as a real file, and its metadata-companion lookup found the AppleDouble._foo.jpg.meta, which was then parsed as XML → "Non-whitespace before first tag." and the project would not open. The reporter's workaround was to rundot_clean.Fix
Add
isMacOSMetadataFile()(matches the._AppleDouble prefix and the literal.DS_Store) and filter these files out at every scan site:getAllFilesSync()— folder child-file scan +ProjectDocumentsFolderMetadataFilemetadata-file fallback — don't rename a._Foo.sessionAppleDouble into place as the real metadata fileFolder.runSanityCheck()— avoid a spurious "multiple project files" warning on these volumesFolder.findZombieMetadataFiles()— same rename-into-place hazardThe matcher is deliberately narrow: it matches
._*and exactly.DS_Store, not every dotfile — so.gitignore,.env, etc. pass through untouched.The
Sessions//People/directory scans inProject.tswere already safe (they filter byisDirectory(), and AppleDouble entries are files).Tests
Unit tests for
isMacOSMetadataFile(AppleDouble,.DS_Store, full-path basenames, and non-matches like.gitignore) and a temp-directory test confirminggetAllFilesSyncskips the junk and returns only the real files.🤖 Generated with Claude Code