Automatically create {config}/UltraFlare/current if it doesn't exist

This commit is contained in:
Noah 2022-10-29 13:18:16 -05:00
parent 62cdd67de4
commit 8c9eae5537

View File

@ -3,9 +3,6 @@ extends Node
var os_name = ""
var suffix = ""
var exec_path = OS.get_config_dir()+"/current/UltraFlare-"+os_name+"-x86_64"+suffix
var executable = File.new()
func get_version():
var version
@ -20,6 +17,12 @@ func get_version():
func _ready():
# Make sure {config}/UltraFlare/current exists
var current_dir = Directory.new()
if not current_dir.dir_exists(OS.get_config_dir()+"/UltraFlare/current"):
current_dir.make_dir_recursive(OS.get_config_dir()+"/UltraFlare/current")
if OS.get_name() == "X11":
os_name = "linux"
elif OS.get_name() == "Windows":