Skip to content

Commit

Permalink
Creating 'user://library' dir on startup so files can be saved
Browse files Browse the repository at this point in the history
  • Loading branch information
NotArme committed Nov 26, 2024
1 parent 15efef3 commit 7d8533b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion material_maker/tools/library_manager/library_manager.gd
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func _ready():
func _exit_tree():
if item_usage_file == "":
return
DirAccess.open("res://").make_dir_recursive(item_usage_file.get_base_dir())
DirAccess.make_dir_recursive_absolute(item_usage_file.get_base_dir())
var file = FileAccess.open(item_usage_file, FileAccess.WRITE)
if file != null:
file.store_string(JSON.stringify(item_usage, "\t", true))
Expand All @@ -55,6 +55,7 @@ func init_libraries() -> void:
add_child(library)
library.generate_node_sections(node_sections)
library = LIBRARY.new()
DirAccess.make_dir_recursive_absolute(user_lib.get_base_dir())
if library.load_library(user_lib):
if library.library_name == "":
library.library_name = user_lib_name
Expand Down

0 comments on commit 7d8533b

Please sign in to comment.