diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-10 10:48:15 +0100 |
|---|---|---|
| committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-10 10:48:15 +0100 |
| commit | 0231b4a0e8f9a7582446b0ff2d52e493277c5eec (patch) | |
| tree | e8f98d390025940c6a2d5707acd8fd23b14b6bf8 /core/io/file_access_compressed.cpp | |
| parent | 2d2902b49befbcdc86a7a6357c1f5b4e4c6ddac0 (diff) | |
| parent | ea11ffc88c22dea2b71d7863808cd65f64f9eded (diff) | |
| download | redot-engine-0231b4a0e8f9a7582446b0ff2d52e493277c5eec.tar.gz | |
Merge pull request #70726 from heppocogne/Fix-open_compressed-get_path
Fix `get_path()` is not working when files are opend with `open_compressed`
Diffstat (limited to 'core/io/file_access_compressed.cpp')
| -rw-r--r-- | core/io/file_access_compressed.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/core/io/file_access_compressed.cpp b/core/io/file_access_compressed.cpp index c9e0c2c638..c256668af0 100644 --- a/core/io/file_access_compressed.cpp +++ b/core/io/file_access_compressed.cpp @@ -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."); |
