Skip to content

Commit

Permalink
Misc: Uncomment code_note code in file saving API methods
Browse files Browse the repository at this point in the history
  • Loading branch information
ithinkandicode committed Feb 27, 2023
1 parent 25bdd59 commit 3f35b8c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions addons/mod_loader/mod_loader_utils.gd
Original file line number Diff line number Diff line change
Expand Up @@ -498,11 +498,15 @@ static func save_string_to_file(save_string: String, filepath: String) -> bool:
# Create directory if it doesn't exist yet
var file_directory := filepath.get_base_dir()
var dir := Directory.new()

code_note(str(
"View error codes here:",
"https://docs.godotengine.org/en/stable/classes/class_%40globalscope.html#enum-globalscope-error"
))

if not dir.dir_exists(file_directory):
var makedir_error = dir.make_dir_recursive(file_directory)
if not makedir_error == OK:
# @todo: Uncomment when PR #139 is merged: https://github.com/GodotModding/godot-mod-loader/pull/139
#code_note("View error codes here: https://docs.godotengine.org/en/stable/classes/class_%40globalscope.html#enum-globalscope-error")
log_fatal("Encountered an error (%s) when attempting to create a directory, with the path: %s" % [makedir_error, file_directory], LOG_NAME)
return false

Expand All @@ -512,8 +516,6 @@ static func save_string_to_file(save_string: String, filepath: String) -> bool:
var fileopen_error = file.open(filepath, File.WRITE)

if not fileopen_error == OK:
# @todo: Uncomment when PR #139 is merged: https://github.com/GodotModding/godot-mod-loader/pull/139
#code_note("View error codes here: https://docs.godotengine.org/en/stable/classes/class_%40globalscope.html#enum-globalscope-error")
log_fatal("Encountered an error (%s) when attempting to write to a file, with the path: %s" % [fileopen_error, filepath], LOG_NAME)
return false

Expand Down

0 comments on commit 3f35b8c

Please sign in to comment.