context: resolve files whose names contain glob metacharacters (e.g. IMG_0347[1].jpg)#916
Merged
JamesHabben merged 1 commit intoJun 26, 2026
Conversation
47f0809 to
038033f
Compare
get_source_file_path() disambiguates same-basename candidates with Path(candidate).match(partial_path). Path.match treats the argument as a glob, so real filenames containing [, ], * or ? (e.g. IMG_0347[1].jpg) are read as wildcards and never resolve, silently dropping the file. Add a single-candidate shortcut (the common, unambiguous case) and, for the multi-candidate case, fall back to an exact normalized path-suffix comparison after the existing Path.match. Backward compatible; only adds resolution for names that previously failed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Summary
Context.get_source_file_path()silently fails to resolve any file whose name contains a glob metacharacter —[,],*, or?. These are common in real device data (e.g.IMG_0347[1].jpg,[clips4sale.com]clip.mp4), so affected files are dropped from artifacts and never linked/rendered.Root cause
When multiple candidates share a basename, the resolver disambiguates with
Path(candidate).match(partial_path).Path.matchtreats the argument as a glob pattern, so metacharacters in a real filename are interpreted as wildcards and the match fails — the file resolves to nothing.Fix
Path.matchfor back-compat, then fall back to a literal normalized path-suffix comparison, which resolves any filename regardless of metacharacters.Behavior is unchanged for all currently-working filenames; it only adds resolution for names that previously failed.
Context
Same bug and fix as abrignoni/RLEAPP#284 (root-cause discussion in abrignoni/RLEAPP#286). The resolver here is identical to the one @JamesHabben confirmed and fixed in iLEAPP. In RLEAPP it was validated against a real ~32 GB return (17,214 device-backup files, many with bracketed names — all now resolve).