Handle .service bundle identifiers in cache paths - #2907
Open
youngjunning wants to merge 1 commit into
Open
Conversation
zorgiepoo
reviewed
Sep 2, 2026
| // so that the cache directory doesn't look like an app bundle directory, which can cause other systematic issues | ||
| // https://github.com/sparkle-project/Sparkle/discussions/2881 | ||
| NSString *appCacheIdentifier; | ||
| if ([bundleIdentifier hasSuffix:@".app"] || [bundleIdentifier hasSuffix:@".APP"]) { |
Member
There was a problem hiding this comment.
Please just add the one/two more || conditions here for .service. The rest of this pull request is not needed, including the unit tests which I don't want. This is working around a macOS bug in a specific context.
Member
There was a problem hiding this comment.
Feel free to use caseInsensitiveCompare: on the bundleIdentifier.pathExtension in here to simplify testing for case.
Member
|
Does your own app actually have a bundle identifier that ends with |
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
Sparkle already appends
.sparklewhen a bundle identifier ends in.app, preventing the cache directory from being treated as an application bundle. macOS also recognizes.serviceas a Service Application bundle, so identifiers ending in.serviceneed the same neutral cache suffix.This change normalizes the final identifier extension case-insensitively, appends
.sparklefor.appand.service, and preserves ordinary bundle identifiers. It also adds focused regression tests for both package-like extensions and unaffected identifiers.This change was prepared with Codex assistance. I reviewed the complete diff and ran Sparkle's official unit-test workflow locally.
Related discussion: #2881
Misc Checklist
Testing
I tested and verified my change by using one or multiple of these methods:
build-for-testingandtest-without-buildingcommandsThe regression tests cover
.appand.servicesuffixes with mixed casing, plus ordinary identifiers that must remain unchanged. The fullDistributionunit-test suite passed with 183 tests, 0 failures, and 0 skipped tests.macOS version tested: 26.5.2 (Xcode 26.6)