From b70fae36a391d0e6531ffe95e276cd64cf8fc599 Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Sat, 2 May 2020 16:41:30 +0300 Subject: [PATCH] Append Global.root_directory to XDG_DATA_DIRS This lets Pixelorama to search for brushes, palettes & patterns in the "pixelorama" folder that may be on the root folder of the executable. Useful for non-package builds, like itch.io, and for the using Pixelorama inside the editor. It should not cause issues for packages but if it does, let me know. --- src/XDGDataPaths.gd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/XDGDataPaths.gd b/src/XDGDataPaths.gd index 01f15c95d..6dcbb0ee9 100644 --- a/src/XDGDataPaths.gd +++ b/src/XDGDataPaths.gd @@ -27,7 +27,7 @@ func use_xdg_standard() -> bool: return OS.get_name() == "X11" -func _init(): +func _init() -> void: if use_xdg_standard(): print("Detected system where we should use XDG basedir standard (currently Linux or BSD)") var home := OS.get_environment("HOME") @@ -62,6 +62,7 @@ func _init(): xdg_data_dirs = [] for unapp_subdir in raw_xdg_data_dirs: xdg_data_dirs.append(unapp_subdir.plus_file(config_subdir_name)) + xdg_data_dirs.append(Global.root_directory.plus_file(config_subdir_name)) else: raw_xdg_data_home = Global.root_directory