Fix portable data folder reselection
This commit is contained in:
parent
ea4d38cb49
commit
45c903bd24
3 changed files with 39 additions and 2 deletions
|
|
@ -679,7 +679,7 @@ func _choose_data_folder() -> void:
|
|||
_data_folder_dialog.dir_selected.connect(_change_data_folder)
|
||||
_interface_fonts.apply_utility_theme(_data_folder_dialog)
|
||||
add_child(_data_folder_dialog)
|
||||
_data_folder_dialog.current_dir = _data_root.root_path.get_base_dir()
|
||||
_data_folder_dialog.current_dir = _data_root.root_path
|
||||
_interface_fonts.popup_file_dialog(_data_folder_dialog)
|
||||
|
||||
|
||||
|
|
@ -691,6 +691,12 @@ func _change_data_folder(path: String) -> void:
|
|||
_show_existing_data_folder_choice(path)
|
||||
return
|
||||
if bool(result.get("ok", false)):
|
||||
if not bool(result.get("changed", false)):
|
||||
_feedback.text = str(
|
||||
result.get("message", "this data folder is already active.")
|
||||
).to_lower()
|
||||
_refresh_data_page()
|
||||
return
|
||||
_feedback.text = "data folder changed. NETfishing will close safely."
|
||||
_refresh_data_page()
|
||||
get_tree().call_deferred("quit")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue