Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Android directory errors #1801

Merged
merged 2 commits into from
Oct 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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