Commit graph

16 commits

Author SHA1 Message Date
aaronp64
2dad2fbce2 Fix ZIPReader.get_files() error on empty zip files
Added check for empty zip file before trying to look at first file

Fixes #90388
2024-04-08 15:57:35 -04:00
Haoyu Qiu
7a833c9b2e Fix ZIPPacker storing file permissions unexpectedly 2024-01-09 13:55:34 +08:00
Haoyu Qiu
08b1354b36 Set language encoding flag when using ZIPPacker
When non-ASCII filenames are used, this indicates that the encoding is
UTF-8. Programs like ZIPReader can then parse the filename correctly.
2023-12-05 17:12:12 +08:00
Florian Kothmeier
a41ae7d69c
Use pass by reference in ZIPPacker & ZIPReader signatures 2023-09-10 00:22:53 +02:00
A Thousand Ships
f7fa72c808 Add function ZIPReader::file_exists 2023-08-16 15:10:32 +02:00
Rémi Verschelde
81064cc239
Doctool: Remove version attribute from XML header
We don't use that info for anything, and it generates unnecessary diffs
every time we bump the minor version (and CI failures if we forget to
sync some files from opt-in modules (mono, text_server_fb).
2023-07-06 10:08:21 +02:00
Rémi Verschelde
346f1ab86b
Bump version to 4.2-dev
Keep on waitin'
2023-07-05 22:07:03 +02:00
Rémi Verschelde
25b2f1780a
Style: Harmonize header includes in modules
This applies our existing style guide, and adds a new rule to that style
guide for modular components such as platform ports and modules:

Includes from the platform port or module ("local" includes) should be listed
first in their own block using relative paths, before Godot's "core" includes
which use "absolute" (project folder relative) paths, and finally thirdparty
includes.

Includes in `#ifdef`s come after their relevant section, i.e. the overall
structure is:

- Local includes
  * Conditional local includes
- Core includes
  * Conditional core includes
- Thirdparty includes
  * Conditional thirdparty includes
2023-06-15 14:35:45 +02:00
Mack
1326b7e04f Fix buffer over-read and memory leaks when using long filepaths in a zip archive and improved robustness of long filepaths and reading files. 2023-05-31 13:11:59 +00:00
Rémi Verschelde
1c1524a651
Bump version to 4.1-dev
Can't stop, won't stop, they said, huh?
2023-03-01 01:44:37 +01:00
Rémi Verschelde
d95794ec8a
One Copyright Update to rule them all
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".
2023-01-05 13:25:55 +01:00
Rémi Verschelde
e3a51e53ef
Merge pull request #68581 from oganm/oganm/master
fix typo in ZIPReader doc
2022-11-22 12:36:45 +01:00
HolonProduction
ab23736751 Fix problem with ZIPPacker
The Zipfile Reference should be set to `NULL` when the `ZIPPacker` is closed not when a file in it is closed.

When calling `ZIPPacker.close` without this nothing happens because `zf` is `NULL`. (7zip could still extract the file but warned about unexpected end of file.)
2022-11-13 12:50:40 +01:00
B. Ogan Mancarcı
fc260cade8
fix typo in zipreader doc 2022-11-12 14:24:42 -08:00
Ben Busby
3b37f50e50
Remove zf != NULL check from ZIPPacker::start_file
This check was removed because it introduces a bug which prevents
ZIPPacker from actually adding any files, since it must be opened before
adding any files (and therefore shouldn't be NULL at the start of
`start_file`).
2022-11-01 11:37:02 -06:00
Marcelo Fernandez
ea6cc3e260 Expose minizip API to allow creating zips using scripts
Co-authored-by: Marcelo Fernandez <marcelofg55@gmail.com>
Co-authored-by: James Westman <flyingpimonster@gmail.commail>
Co-authored-by: MisterMX <mbxd12@web.de>

Signed-off-by: MisterMX <mbxd12@web.de>
2022-10-14 21:51:38 +02:00