Improve some DirAccess usage

This commit is contained in:
kobewi
2022-03-06 15:01:13 +01:00
parent 272b355954
commit 73fdb22668
3 changed files with 3 additions and 3 deletions

View File

@@ -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)) {