diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-06-11 11:46:35 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-06-11 11:46:35 +0200 |
commit | e4fa8543ea11b7d25c24c81c4a0b824b60fb82ec (patch) | |
tree | 1cb028256f8c3dbb92ea9ea4c7af73d1c363d451 /core/io/file_access.cpp | |
parent | 62a056aa56ca4471c035e43741c88e4a22d81802 (diff) | |
download | redot-engine-e4fa8543ea11b7d25c24c81c4a0b824b60fb82ec.tar.gz |
Revert "Fix FileSystem dock won't show any file folders"
This reverts commit 72856d633a6be5c596d4a3231acab009828a2efe.
Fixes #93022.
Diffstat (limited to 'core/io/file_access.cpp')
-rw-r--r-- | core/io/file_access.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/io/file_access.cpp b/core/io/file_access.cpp index a762e24ff3..1cf388b33a 100644 --- a/core/io/file_access.cpp +++ b/core/io/file_access.cpp @@ -59,9 +59,11 @@ bool FileAccess::exists(const String &p_name) { return true; } - // Using file_exists because it's faster then trying to open the file. - Ref<FileAccess> ret = create_for_path(p_name); - return ret->file_exists(p_name); + Ref<FileAccess> f = open(p_name, READ); + if (f.is_null()) { + return false; + } + return true; } void FileAccess::_set_access_type(AccessType p_access) { |