You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +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
This commit is contained in:
@@ -184,6 +184,22 @@ bool FileAccessCompressed::is_open() const {
|
||||
return f.is_valid();
|
||||
}
|
||||
|
||||
String FileAccessCompressed::get_path() const {
|
||||
if (f.is_valid()) {
|
||||
return f->get_path();
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
String FileAccessCompressed::get_path_absolute() const {
|
||||
if (f.is_valid()) {
|
||||
return f->get_path_absolute();
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
void FileAccessCompressed::seek(uint64_t p_position) {
|
||||
ERR_FAIL_COND_MSG(f.is_null(), "File must be opened before use.");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user