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

OS.shell_open cannot open folder in macOS #52828

Open
qdwang opened this issue Sep 18, 2021 · 5 comments
Open

OS.shell_open cannot open folder in macOS #52828

qdwang opened this issue Sep 18, 2021 · 5 comments

Comments

@qdwang
Copy link

qdwang commented Sep 18, 2021

Godot version

3.3.3 stable

System information

macOS 10.12 to macOS 11

Issue description

OS.shell_open(OS.get_user_data_dir()) will cause a error.

Steps to reproduce

Just run OS.shell_open(OS.get_user_data_dir())

Minimal reproduction project

No response

@Calinou
Copy link
Member

Calinou commented Sep 18, 2021

@qdwang What's the value of OS.get_user_data_dir()? Also, can you paste the error message here?

PS: Please upgrade to Godot 3.3.3 and test this again as old patch releases are no longer supported.

@qdwang
Copy link
Author

qdwang commented Sep 19, 2021

Sorry, I am using 3.3.3

It won't even work with /Users or any folder.

OS.shell_open(ProjectSettings.globalize_path("user://")) also won't work.

The error message is application cannot be opened -50.

It seems the macOS considers it as an application open process.

@qdwang
Copy link
Author

qdwang commented Sep 19, 2021

Oh, I just figured out that I need to add file:// before the path. Now it's working in macOS.

@Calinou
Copy link
Member

Calinou commented Sep 19, 2021

@bruvzg Should we prepend file:// automatically if no protocol was detected in the string passed to OS.shell_open()?

@rsubtil
Copy link
Contributor

rsubtil commented Sep 19, 2021

I made a comment on #51691 (comment) that is somewhat related to this; whether shell_open should automatically detect and change behavior depenging on the given URIs, or if should only handle file:// and make another method for handling other URIs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants