summaryrefslogtreecommitdiffstats
path: root/core/io/file_access_zip.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Reduce code duplication in FileAccessBlueCube33102024-09-011-7/+1
|
* [Core] Use unztell64 in FileAccessZIP to ensure 64 bit returnFabio Alessandrelli2024-04-261-1/+1
|
* Add const lvalue ref to core/* container parametersMuller-Castro2024-02-141-2/+2
|
* Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicableA Thousand Ships2023-10-081-10/+10
|
* [Core] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicableA Thousand Ships2023-09-111-2/+2
|
* Fix error when non-ASCII characters in resource pack pathHaoyu Qiu2023-07-021-1/+1
|
* Restore FileAccess.close method.bruvzg2023-02-161-0/+4
|
* One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
| | | | | | | | | | | | | | | | | | | | As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
* Fix FileAccessZip() causing a stack overflownikitalita2022-09-261-1/+1
|
* Replace File/Directory with FileAccess/DirAccesskobewi2022-09-191-1/+1
|
* Remove or make private `FileAccess` `close()` methods.bruvzg2022-04-121-3/+3
|
* Make FileAccess and DirAccess classes reference counted.bruvzg2022-04-111-22/+24
|
* Fix multiple missing UTF-8 decoding.bruvzg2022-01-061-1/+1
|
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Fix some LGTM errors of "Multiplication result converted to larger type"Aaron Franke2021-10-121-1/+1
|
* Core: Move DirAccess and FileAccess to `core/io`Rémi Verschelde2021-06-111-1/+1
| | | | | File handling APIs are typically considered part of I/O, and we did have most `FileAccess` implementations in `core/io` already.
* Rename File::get_len() get_length()Marcel Admiraal2021-05-251-3/+3
|
* Fix duplicate close files when deconstructing ZipArchiveZae2021-05-241-2/+0
|
* Make all file access 64-bit (uint64_t)Pedro J. Estébanez2021-05-171-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the types of a big number of variables. General rules: - Using `uint64_t` in general. We also considered `int64_t` but eventually settled on keeping it unsigned, which is also closer to what one would expect with `size_t`/`off_t`. - We only keep `int64_t` for `seek_end` (takes a negative offset from the end) and for the `Variant` bindings, since `Variant::INT` is `int64_t`. This means we only need to guard against passing negative values in `core_bind.cpp`. - Using `uint32_t` integers for concepts not needing such a huge range, like pages, blocks, etc. In addition: - Improve usage of integer types in some related places; namely, `DirAccess`, core binds. Note: - On Windows, `_ftelli64` reports invalid values when using 32-bit MinGW with version < 8.0. This was an upstream bug fixed in 8.0. It breaks support for big files on 32-bit Windows builds made with that toolchain. We might add a workaround. Fixes #44363. Fixes godotengine/godot-proposals#400. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
* Merge pull request #42337 from zaevi/fix-zip-open-twiceRémi Verschelde2021-05-141-21/+17
|\ | | | | Fix zip file opening twice
| * Fix zip file opening twiceZae2021-05-141-21/+17
| |
* | Core: Drop custom `copymem`/`zeromem` definesRémi Verschelde2021-04-271-2/+1
| | | | | | | | | | | | | | | | We've been using standard C library functions `memcpy`/`memset` for these since 2016 with 67f65f66391327b2967a20a89c3627e1dd6e84eb. There was still the possibility for third-party platform ports to override the definitions with a custom header, but this doesn't seem useful anymore.
* | Allow nullptr with zero length in FileAccess get_bufferAlex Hirsch2021-03-161-1/+1
| | | | | | | | fix #47071
* | Add parameter checkes to FileAccess get_buffer functionsAlex Hirsch2021-03-091-0/+2
| | | | | | | | fix #46540
* | Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
* | Remove empty lines around braces with the formatting scriptAaron Franke2020-11-161-1/+0
|/
* Adds PCK encryption support (using script encryption key for export).bruvzg2020-09-051-1/+1
| | | | Change default encryption mode from ECB to CFB.
* [Complex Test Layouts] Change `String` to use UTF-32 encoding on all platforms.bruvzg2020-09-031-2/+2
|
* added load resource pack with offset featureYilin Ma2020-09-021-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | updated variables to use size_t removed line break to make code style more consistent added conditional check to return an error if offset field is used when loading a ZIP package fixed typo formatted file added commit regarding self contained exe files handled error loging for load zip file with offset spelling tweak updated conditional statement for magic check udpated error message when load Zip file with offset is called fix CI Trying to fix CI fix CI done Added error message for loading self-contained exe with offset. Updated documentation. Fix indent final fix indent Updated documentation. fix indents Updated doc based on suggestion Final fix fixed format
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-5/+10
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-35/+0
| | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* Port member initialization from constructor to declaration (C++11)Rémi Verschelde2020-05-141-6/+2
| | | | | | | | | | Using `clang-tidy`'s `modernize-use-default-member-init` check and manual review of the changes, and some extra manual changes that `clang-tidy` failed to do. Also went manually through all of `core` to find occurrences that `clang-tidy` couldn't handle, especially all initializations done in a constructor without using initializer lists.
* Revert "Made possible to specify where to dump the contents when loading a ↵Rémi Verschelde2020-04-201-21/+2
| | | | | | | | | ".pck" file" This reverts commit 3c261e0dfa19d9c661ad6ca908a3b8ccee050016. This was not so useful as is due to the way dependency paths are stored in scenes and resources.
* Made possible to specify where to dump the contents when loading a ".pck" fileMichael Alexsander2020-04-161-2/+21
|
* Replace NULL with nullptrlupoDharkael2020-04-021-13/+13
|
* Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
| | | | | | | | | | | Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
* Merge pull request #32291 from Dragoncraft89/add_load_resource_flagRémi Verschelde2019-09-251-2/+2
|\ | | | | Add flag to control the replacement of files by ProjectSettings.load_resource_pack
| * Add flag to control the replacement of files by ↵Florian Kothmeier2019-09-251-2/+2
| | | | | | | | ProjectSettings.load_resource_pack
* | Merge pull request #32051 from qarmin/some_error_explanationRémi Verschelde2019-09-251-3/+3
|\ \ | |/ |/| Added some obvious errors explanations
| * Added some obvious errors explanationsqarmin2019-09-251-3/+3
| |
* | Changed some code found by Clang Tidy and Coverityqarmin2019-09-221-1/+1
|/
* Add -Wshadow=local to warnings and fix reported issues.marxin2019-02-201-3/+3
| | | | Fixes #25316.
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Moved member variables to initializer listWilson E. Alvarez2018-12-111-45/+44
|
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-051-0/+1
| | | | | | Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
* Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Extract logging logicRuslan Mustakov2017-09-251-0/+5
| | | | | | | | | | | | | | | | | | | Previously logging logic was scattered over OS class implementations with plenty of duplication. Major changes in this commit: - Extracted logging logic into a separate Logger hierarchy. It allows easy configuration of logging mechanism depending on compile-time or run-time configuration. - Implemented RotatedFileLogger which is usually used with StdLogger, providing persistency of logs. It is often important to be able to obtain logs of the game even in production to be able to understand what happened prior to some problem. On mobile there previously was no way to obtain the logs aside from having the device connected to your machine. - flush() is not performed in release mode for every logged line. It is only performed for errors.
* Rename pos to position in user facing methods and variablesletheed2017-09-201-3/+3
| | | | | | | | | | | Rename user facing methods and variables as well as the corresponding C++ methods according to the folloming changes: * pos -> position * rot -> rotation * loc -> location C++ variables are left as is.
* Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-271-1/+1
|
* Synchronize parameter names in definition and declarationTwistedTwigleg2017-08-161-6/+6
| | | | Fixes #10244.