Skip to content
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

Implement native method for PresentFileExternally in MacOS #6365

Merged
merged 4 commits into from
Aug 27, 2024

Conversation

cdwcgt
Copy link
Contributor

@cdwcgt cdwcgt commented Aug 26, 2024

apple doc: https://developer.apple.com/documentation/appkit/nsworkspace/1524399-selectfile

This API only overrides PresentFileExternally as it can only highlight the incoming file in its parent directory.

We check if the file exists first (see c1fd956), because if the file doesn't exist, the API won't do anything so we will fall back to OpenFileExternally, which then uses openUsingShellExecute.

4e5ebb047b21fa55a49d17a7b49b52fe

cdwcgt and others added 3 commits August 26, 2024 22:40
mac's native method will not open file if file is not exists

in this case, we fallback to `OpenFileExternally`, so that we can show the folder and without highlight

Co-Authored-By: PercyDan <[email protected]>
@peppy peppy self-requested a review August 26, 2024 15:28
@peppy peppy self-requested a review August 27, 2024 03:58
@peppy peppy merged commit 4e3ef47 into ppy:master Aug 27, 2024
19 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants