New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: edge case in app.isInApplicationsFolder() #35636
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the filesystem can be formatted as case-sensitive
@miniak can you say more about how the change should be implemented? |
You need to normalize the bundle path (effectively call realpath on it) |
Good idea, done. |
Release Notes Persisted
|
* fix: edge case in IsInApplicationsFolder * use realpath instead * lint * revert lowercasing * optimize * Update shell/browser/ui/cocoa/electron_bundle_mover.mm * lint Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
I have automatically backported this PR to "19-x-y", please check out #35729 |
* fix: edge case in IsInApplicationsFolder * use realpath instead * lint * revert lowercasing * optimize * Update shell/browser/ui/cocoa/electron_bundle_mover.mm * lint Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
* fix: edge case in IsInApplicationsFolder * use realpath instead * lint * revert lowercasing * optimize * Update shell/browser/ui/cocoa/electron_bundle_mover.mm * lint Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
I have automatically backported this PR to "21-x-y", please check out #35730 |
I have automatically backported this PR to "20-x-y", please check out #35731 |
fix: edge case in app.isInApplicationsFolder() (#35636) * fix: edge case in IsInApplicationsFolder * use realpath instead * lint * revert lowercasing * optimize * Update shell/browser/ui/cocoa/electron_bundle_mover.mm * lint Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: Kishan Bagaria <hi@kishan.info> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
fix: edge case in app.isInApplicationsFolder() (#35636) * fix: edge case in IsInApplicationsFolder * use realpath instead * lint * revert lowercasing * optimize * Update shell/browser/ui/cocoa/electron_bundle_mover.mm * lint Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: Kishan Bagaria <hi@kishan.info> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
* fix: edge case in IsInApplicationsFolder * use realpath instead * lint * revert lowercasing * optimize * Update shell/browser/ui/cocoa/electron_bundle_mover.mm * lint Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Description of Change
This fixes an edge case in
app.isInApplicationsFolder()
which returns false when an app is launched from Terminal like this:while this works fine:
(Altho this seems unlikely to affect things much, we've received at least one user report of
app.isInApplicationsFolder()
returning false incorrectly when the app is launched from Finder and this has some likelihood of fixing that.)Checklist
npm test
passesRelease Notes
Notes: Fixed an edge case in
app.isInApplicationsFolder()
which would return false incorrectly in some cases.