Merge pull request #98483 from timothyqiu/pack-dir-exists

`DirAccessPack`: Fix `file_exists` and `dir_exists` in exported projects
This commit is contained in:
Thaddeus Crews 2024-11-18 09:23:37 -06:00
commit 80e73b0dca
No known key found for this signature in database
GPG Key ID: 62181B86FE9E5D84

View File

@ -590,8 +590,6 @@ String DirAccessPack::get_current_dir(bool p_include_drive) const {
} }
bool DirAccessPack::file_exists(String p_file) { bool DirAccessPack::file_exists(String p_file) {
p_file = fix_path(p_file);
PackedData::PackedDir *pd = _find_dir(p_file.get_base_dir()); PackedData::PackedDir *pd = _find_dir(p_file.get_base_dir());
if (!pd) { if (!pd) {
return false; return false;
@ -600,8 +598,6 @@ bool DirAccessPack::file_exists(String p_file) {
} }
bool DirAccessPack::dir_exists(String p_dir) { bool DirAccessPack::dir_exists(String p_dir) {
p_dir = fix_path(p_dir);
return _find_dir(p_dir) != nullptr; return _find_dir(p_dir) != nullptr;
} }