summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-03-06 22:45:07 +0100
committerGitHub <noreply@github.com>2022-03-06 22:45:07 +0100
commit78ad01cae7d68c34cd187b9c3a94583e95ff306f (patch)
treeabeb5ac4f6e06b91bfa85e70b9805e7f01422ece
parent47f1c4f900b3f1b367b992b6e2e63e2cc27dc16b (diff)
parent73fdb22668e4c4e7b9b857063195c7b489385985 (diff)
Merge pull request #58839 from KoBeWi/access_creator
Improve some DirAccess usage
-rw-r--r--editor/editor_export.cpp2
-rw-r--r--editor/export_template_manager.cpp2
-rw-r--r--editor/filesystem_dock.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index 295b477080..1afd59e99c 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -542,7 +542,7 @@ void EditorExportPlatform::_edit_filter_list(Set<String> &r_list, const String &
filters.push_back(f);
}
- DirAccess *da = DirAccess::open("res://");
+ DirAccess *da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
ERR_FAIL_NULL(da);
_edit_files_with_filter(da, filters, r_list, exclude);
memdelete(da);
diff --git a/editor/export_template_manager.cpp b/editor/export_template_manager.cpp
index 3cad600002..0a8d35aff1 100644
--- a/editor/export_template_manager.cpp
+++ b/editor/export_template_manager.cpp
@@ -645,7 +645,7 @@ Error ExportTemplateManager::install_android_template_from_file(const String &p_
// To support custom Android builds, we install the Java source code and buildsystem
// from android_source.zip to the project's res://android folder.
- DirAccessRef da = DirAccess::open("res://");
+ DirAccessRef da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
ERR_FAIL_COND_V(!da, ERR_CANT_CREATE);
// Make res://android dir (if it does not exist).
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index b41123c0dd..e5cd7b8974 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -512,7 +512,7 @@ void FileSystemDock::_navigate_to_path(const String &p_path, bool p_select_in_fa
if (target_path.ends_with("/")) {
target_path = target_path.substr(0, target_path.length() - 1);
}
- DirAccess *dirAccess = DirAccess::open("res://");
+ DirAccess *dirAccess = DirAccess::create(DirAccess::ACCESS_RESOURCES);
if (dirAccess->file_exists(p_path)) {
path = target_path;
} else if (dirAccess->dir_exists(p_path)) {