From 0bc26bbbaee5cc174e89157d640aa2d617e9640f Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Tue, 30 Jun 2020 22:36:03 +0300 Subject: [PATCH] Always ensure that directory_path is "user://" on HTML5 --- src/UI/Dialogs/ExportDialog.gd | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/UI/Dialogs/ExportDialog.gd b/src/UI/Dialogs/ExportDialog.gd index 333b196de..2a646d54f 100644 --- a/src/UI/Dialogs/ExportDialog.gd +++ b/src/UI/Dialogs/ExportDialog.gd @@ -77,11 +77,6 @@ func _ready() -> void: $VBoxContainer/AnimationOptions/AnimationType.selected = AnimationType.MULTIPLE_FILES $VBoxContainer/AnimationOptions/AnimationType.disabled = true - # If we're on HTML5, don't let the user change the directory path - if OS.get_name() == "HTML5": - $VBoxContainer/Path.visible = false - directory_path = "user://" - func show_tab() -> void: $VBoxContainer/FrameOptions.hide() @@ -503,6 +498,11 @@ func _on_ExportDialog_about_to_show() -> void: if was_exported: restore_previous_export_settings() + # If we're on HTML5, don't let the user change the directory path + if OS.get_name() == "HTML5": + $VBoxContainer/Path.visible = false + directory_path = "user://" + if directory_path.empty(): directory_path = OS.get_system_dir(OS.SYSTEM_DIR_DESKTOP)