From 69e8f24fdd14401c129e1107b0a3c6380986feda Mon Sep 17 00:00:00 2001 From: Kasper Frandsen Date: Tue, 21 Mar 2023 15:17:09 +0000 Subject: [PATCH] docs: fix for File -> FileAccess change --- tutorials/plugins/editor/import_plugins.rst | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tutorials/plugins/editor/import_plugins.rst b/tutorials/plugins/editor/import_plugins.rst index 244e3ac5d..9c0af4160 100644 --- a/tutorials/plugins/editor/import_plugins.rst +++ b/tutorials/plugins/editor/import_plugins.rst @@ -294,10 +294,9 @@ method. Our sample code is a bit long, so let's split in a few parts: :: func _import(source_file, save_path, options, r_platform_variants, r_gen_files): - var file = File.new() - var err = file.open(source_file, File.READ) - if err != OK: - return err + var file = FileAccess.open(source_file, FileAccess.READ) + if file == null: + return FileAccess.get_open_error() var line = file.get_line()