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

Make default palettes available for clean installs on MacOS #1008

Merged
merged 3 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Autoload/Global.gd
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,10 @@ func _init() -> void:
loaded_locales.sort() # Make sure locales are always sorted
if OS.has_feature("template"):
root_directory = OS.get_executable_path().get_base_dir()
if OS.get_name() == "macOS":
data_directories.append(
root_directory.path_join("../Resources").path_join(CONFIG_SUBDIR_NAME)
)
data_directories.append(root_directory.path_join(CONFIG_SUBDIR_NAME))
if OS.get_name() in ["Linux", "FreeBSD", "NetBSD", "OpenBSD", "BSD"]:
# Checks the list of files var, and processes them.
Expand Down
2 changes: 1 addition & 1 deletion src/Autoload/Palettes.gd
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ func _get_palette_files(path: String) -> PackedStringArray:
var dir := DirAccess.open(path)
var results: PackedStringArray = []

if not is_instance_valid(dir) or not dir.dir_exists(path):
if !dir:
return []

dir.list_dir_begin()
Expand Down