-
Notifications
You must be signed in to change notification settings - Fork 101
Description
I have found an error (LS -50, cannot open application) on MacOS. This is probably device / system specific or maybe it’s literally just a problem on my side.
This error appears whenever the following code is used: var _ok = OS.shell_open(ProjectSettings.globalize_path("user://mods”))
Upon cheating my way into a solution (I did not make this nor do I take credit for it) replacing every instance of the code above (any time OS.shell_open() is used) with the following:
var path = ProjectSettings.globalize_path("user://mods")
if OS.get_name() == "OSX":
#macOS workaround using 'open' command directly
OS.execute("open", [path], false)
else:
#Other platforms (Windows, Linux) use shell_open
OS.shell_open(path)
This worked in a Godot debug session for me when I replaced every instance of OS.shell that stopped me from messing around with trying to make a mod. I have not tried to test it outside of a debug session. I also don’t know if this solution works for other platforms as well.
I hope this helps, if not then I’m sorry to waste time.