Skip to content

Commit

Permalink
Merge pull request #1801 from WolfgangSenff/dialogic-1
Browse files Browse the repository at this point in the history
Fix Android directory errors
  • Loading branch information
zaknafean authored Oct 11, 2023
2 parents 378e082 + e1f2dd2 commit b6c74ca
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions addons/dialogic/Other/DialogicResources.gd
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,9 @@ static func get_saves_folders() -> Array:
else:
printerr("JavaScript not enabled")
if directory.open(WORKING_DIR) != OK:
print("[D] Error: Failed to access working directory.")
return []
if not directory.make_dir(WORKING_DIR):
print("[D] Error: Failed to access working directory.")
return []

directory.list_dir_begin()
var file_name = directory.get_next()
Expand All @@ -350,8 +351,9 @@ static func get_saves_folders() -> Array:
static func add_save_folder(save_name: String) -> void:
var directory := Directory.new()
if directory.open(WORKING_DIR) != OK:
print("[D] Error: Failed to access working directory.")
return
if not directory.make_dir(WORKING_DIR):
print("[D] Error: Failed to access working directory.")
return
directory.make_dir(save_name)

var file := File.new()
Expand Down

0 comments on commit b6c74ca

Please sign in to comment.