diff --git a/src/Preferences/HandleExtensions.gd b/src/Preferences/HandleExtensions.gd index 00f1b6972..c21f2ecc9 100644 --- a/src/Preferences/HandleExtensions.gd +++ b/src/Preferences/HandleExtensions.gd @@ -67,15 +67,13 @@ func _ready() -> void: func install_extension(path: String) -> void: var file_name := path.get_file() - var dir := DirAccess.open(path.get_base_dir()) - dir.copy(path, EXTENSIONS_PATH.path_join(file_name)) + var dir := DirAccess.copy_absolute(path, EXTENSIONS_PATH.path_join(file_name)) _add_extension(file_name) func _uninstall_extension(file_name := "", remove_file := true, item := extension_selected) -> void: if remove_file: - var dir := DirAccess.open(EXTENSIONS_PATH.path_join(file_name)) - var err := dir.remove(EXTENSIONS_PATH.path_join(file_name)) + var err := DirAccess.remove_absolute(EXTENSIONS_PATH.path_join(file_name)) if err != OK: print(err) return