Skip to content

Commit

Permalink
Make sure that directory exists before accessing the user library
Browse files Browse the repository at this point in the history
  • Loading branch information
NotArme committed Nov 26, 2024
1 parent 76800ab commit 15efef3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion material_maker/tools/library_manager/library.gd
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func get_sections() -> Array:
return Array(sections)

func save_library() -> void:
DirAccess.open("res://").make_dir_recursive(library_path.get_base_dir())
DirAccess.make_dir_recursive_absolute(library_path.get_base_dir())
var file : FileAccess = FileAccess.open(library_path, FileAccess.WRITE)
if file != null:
file.store_string(JSON.stringify({name=library_name, lib=library_items}, "\t", true))
Expand Down

0 comments on commit 15efef3

Please sign in to comment.