From 8c9eae55377fb35ef7e32d7257078cc9c370bad3 Mon Sep 17 00:00:00 2001 From: Noah Date: Sat, 29 Oct 2022 13:18:16 -0500 Subject: [PATCH] Automatically create {config}/UltraFlare/current if it doesn't exist --- Versions.gd | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Versions.gd b/Versions.gd index 8c30a23..5fcba15 100644 --- a/Versions.gd +++ b/Versions.gd @@ -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":