1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-19 01:29:49 +00:00

YAY THE MAIN USER DIRECTORY WORKS

This commit is contained in:
sapient_cogbag 2020-04-11 08:23:21 +01:00
parent b2eafc5464
commit 683f6aa92b
No known key found for this signature in database
GPG key ID: 9DA0A435732D7C4A

View file

@ -25,7 +25,9 @@ const brushes_data_subdirectory := "Brushes"
# Get if we should use XDG standard or not nyaaaa
func use_xdg_standard() -> bool:
# see: https://docs.godotengine.org/en/latest/getting_started/workflow/export/feature_tags.html
return OS.has_feature("Linux") or OS.has_feature("BSD")
# return OS.has_feature("Linux") or OS.has_feature("BSD")
# Previous was unreliable and buggy >.< nyaa
return OS.get_name() == "X11"
# Called when the node enters the scene tree for the first time.
func _ready():
@ -119,8 +121,10 @@ func ensure_xdg_user_dirs_exist() -> void:
var brushes_writing_dir := get_brushes_write_path()
# Create the palette and brush dirs
if not actual_data_dir.dir_exists(palette_writing_dir):
print("Making directory %s" % [palette_writing_dir])
actual_data_dir.make_dir(palette_writing_dir)
if not actual_data_dir.dir_exists(brushes_writing_dir):
print("Making directory %s" % [brushes_writing_dir])
actual_data_dir.make_dir(brushes_writing_dir)