1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-13 13:31:48 +00:00

Fix get_path() is not working when files are opend with open_compressed

And also fixed `get_absolute_path()` in the same way

(cherry picked from commit ea11ffc88c)
This commit is contained in:
heppocogne
2022-12-30 10:26:51 +09:00
committed by Rémi Verschelde
parent 5703cc861f
commit aa8d6c5633
2 changed files with 19 additions and 0 deletions

View File

@@ -190,6 +190,22 @@ bool FileAccessCompressed::is_open() const {
return f != nullptr;
}
String FileAccessCompressed::get_path() const {
if (f) {
return f->get_path();
} else {
return "";
}
}
String FileAccessCompressed::get_path_absolute() const {
if (f) {
return f->get_path_absolute();
} else {
return "";
}
}
void FileAccessCompressed::seek(uint64_t p_position) {
ERR_FAIL_COND_MSG(!f, "File must be opened before use.");