-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Open Download Folder not working on OSX
- Loading branch information
Showing
1 changed file
with
10 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
extends Button | ||
|
||
func _on_OpenFolder_pressed(): | ||
# warning-ignore:return_value_discarded | ||
OS.shell_open(ProjectSettings.globalize_path("user://versions/")) | ||
var dir = Directory.new() | ||
if not dir.dir_exists("user://versions/"): | ||
var err = dir.make_dir("user://versions/") | ||
print_debug(err) | ||
var path = ProjectSettings.globalize_path("user://versions/") | ||
if OS.has_feature("OSX"): | ||
path = "file://" + path | ||
var err = OS.shell_open(path) | ||
if err != OK: | ||
print_debug(err) |