Nathan Moin Vaziri
3f23ed7a11
minizip: place erase temp on same filesystem when TMPDIR differs
...
minizip_erase rewrites the archive to a temp file under TMPDIR and
then renames it onto the source. rename(2) returns EXDEV across
filesystems, so when TMPDIR (e.g. /tmp) and the source live on
different mounts (a common conda-forge pattern), the rename fails
after the original was already moved aside to .bak — the next
operation that opens the archive sees no file and reports -111.
Add mz_os_path_same_fs() and have minizip_erase fall back on POSIX to
a same-dir temp when TMPDIR is on a different filesystem. POSIX uses
stat() st_dev comparison; Win32 uses _wstati64 for the parallel check
but the caller skips it under #ifndef _WIN32 because MoveFileExW with
MOVEFILE_COPY_ALLOWED already absorbs cross-volume rename internally.
Make the same-dir tmp filename unique (mz_ms_time suffix) and refuse
to clobber an existing leftover from a prior crash.
Refs #943 .
2026-04-26 17:49:20 -07:00
Paul Marquess
d2d6b76d79
Refactor file rename error handling when backup fails
2026-03-11 11:21:20 -07:00
Paul Marquess
5880418f43
Add support for PPMd compression
2026-01-30 10:03:22 -08:00
Nathan Moinvaziri
5a3c62cf70
Fix arbitrary file write vulnerability via temp file symlink #938
2026-01-21 13:48:10 -08:00
Tomas Kalibera
b0568345a3
Mark handle as unused.
...
To avoid warning, consistently with other functions/args in the file.
2025-05-23 09:34:27 -07:00
Cœur
4e88434cdf
free up writer memory when failing to open archive for reading
2025-05-04 18:53:04 -04:00
tbeu
1529686f37
Apply Clang format
2025-03-23 14:09:01 -07:00
tbeu
5e99d52a00
Consider passed codepage on listing and extraction callback
2025-03-23 14:07:59 -07:00
Herman Semenov
e6eeb4ea52
Align structures for 64-bit platforms (stream_split, mz_opt, crypt_sha, crypt_hmac)
...
- mz_stream_split 120 -> 104 bytes
- minizip_opt 32 -> 24 bytes
- mz_crypt_sha 32 -> 24 bytes
- mz_crypt_hmac 40 -> 32 bytes
2025-03-11 19:42:25 -07:00
Nathan Moinvaziri
2c51fa719e
Clang-format style changes.
2024-11-01 16:37:57 -07:00
Nathan Moinvaziri
07db361a6e
Fixed listing empty zip file. #756
2024-06-01 14:09:47 -07:00
Nathan Moinvaziri
0c3a741b36
Remove left over signing code from v3.
2024-02-16 18:32:53 -08:00
Mike Kasick
21606891ab
Support compression levels >= 10 and use zstd's internal default level.
...
zstd supports regular compression levels 1 through 22. The special
level 0 indicates to use zstd's internal default (currently level 3).
2023-09-12 12:03:29 -07:00
Nathan Moinvaziri
217adc9363
Remove first param from create functions.
...
Better handle low memory situations.
2023-04-09 11:14:26 -07:00
Nathan Moinvaziri
3da04514cd
Remove signing feature.
...
Too much work to maintain and rarely used. Continue to use v3 for that feature.
2023-04-09 11:14:26 -07:00
Nathan Moinvaziri
f07faecdde
Remove all comparisons to NULL.
2023-02-19 16:04:13 -08:00
Nathan Moinvaziri
03e4d2213d
Remove copyright years.
2023-02-16 13:14:21 -08:00
Nathan Moinvaziri
848c3e3503
Removed empty lines.
2022-11-29 17:19:49 -08:00
Nathan Moinvaziri
db95894646
Updated name of project to minizip-ng.
2021-01-23 16:19:05 -08:00
Nathan Moinvaziri
1a7e7e4a4c
Fixed issues with XZ compression when using libcompression.
2020-10-25 15:10:58 -07:00
Nathan Moinvaziri
b729653bc1
Fixed xz command line argument in minigzip.
2020-10-25 12:31:43 -07:00
Nathan Moinvaziri
c4668ed5ca
Added support for XZ format.
...
Use official LZMA/XZ repository.
2020-10-25 11:58:02 -07:00
Nathan Moinvaziri
808ba3b9c4
Set aes option when creating archive in minizip. #525
2020-10-13 11:18:46 -07:00
Nathan Moinvaziri
70811ac6f5
Remove version number from headers.
2020-06-19 21:21:12 -07:00
Nathan Moinvaziri
1f4758bd7f
Added support for ZSTD. #498
...
Co-authored-by: Force Charlie <fcharlie@users.noreply.github.com>
2020-06-14 22:02:12 -07:00
Nathan Moinvaziri
dc6962b5fa
Use same brace style as zlib.
2020-06-14 22:00:02 -07:00
Nathan Moinvaziri
3f1d2a4854
Remove unused -j command line parameter. #495
...
Added -e parameter to help message.
2020-06-14 22:00:02 -07:00
Nathan Moinvaziri
2aa369c468
Version 2.9.3.
2020-05-21 07:31:09 -07:00
Nathan Moinvaziri
b39f7a0e89
Version 2.9.2.
2020-02-12 08:38:09 -08:00
Nathan Moinvaziri
370ab036f3
Version 2.9.1.
2019-11-15 13:24:17 -08:00
Nathan Moinvaziri
545d729594
More robust recovery method, seek to next local header and seek backward for data descriptor. #431
2019-10-21 15:32:18 -07:00
Nathan Moinvaziri
10ac291d91
Version 2.9.0.
2019-09-18 16:55:43 -07:00
Nathan Moinvaziri
fe33c3d1b6
Fixed invalid literal PRI- when compiling with C++. #416
2019-09-16 11:07:43 -07:00
Nathan Moinvaziri
84a398027d
Added option to enable signing which is by default turned on. But now at least people don't have to define MZ_ZIP_NO_SIGNING in most projects I see. Signing support now requires MZ_ZIP_SIGNING to be defined.
2019-08-14 20:31:04 -07:00
Nathan Moinvaziri
32fd805440
Version 2.8.9.
2019-07-04 10:32:02 -07:00
Nathan Moinvaziri
fbfd4e82f7
Version 2.8.8.
2019-05-22 17:50:39 -07:00
Nathan Moinvaziri
64c4c7f868
Version 2.8.7.
2019-05-09 18:46:18 -07:00
Nathan Moinvaziri
cb4f9f6960
Fixed formatting.
2019-05-05 20:18:19 -07:00
Nathan Moinvaziri
a5a1d5d272
Store symbolic links in UNIX1 extra field instead of file attributes.
...
Correct reading of UNIX1 extra field timestamps.
Added option to store links to minizip cmd.
2019-05-05 20:13:58 -07:00
Nathan Moinvaziri
9cb3cb14b2
Added follow symbolic links option.
2019-05-05 12:24:08 -07:00
Nathan Moinvaziri
3249eac087
Added support for symbolic links. ZipArchive/ZipArchive#424 .
2019-05-02 21:07:39 -07:00
Nathan Moinvaziri
8f7474c8d4
Removed debug code that sets the archive comment.
2019-05-02 20:49:01 -07:00
Nathan Moinvaziri
4fe0687243
Version 2.8.6.
2019-04-08 13:26:32 -07:00
Nathan Moinvaziri
488f20ff1b
Version 2.8.5.
2019-03-17 09:38:10 -07:00
Nathan Moinvaziri
9805ab4117
Version 2.8.4.
2019-02-14 17:16:01 -08:00
Nathan Moinvaziri
d484eca50e
Fixed check on return value from mz_zip_reader_save_all when no files in archive.
...
Changed error message language.
2019-02-13 09:08:59 -08:00
Nathan Moinvaziri
2e2f995eda
Version 2.8.3.
2019-01-26 16:49:48 -08:00
Nathan Moinvaziri
e7ede97c07
Fixed files are mistakenly listed as encrypted. #359
2019-01-16 11:15:00 -08:00
Nathan Moinvaziri
2ca7f3950c
Version 2.8.2.
2019-01-08 16:07:10 -08:00
Nathan Moinvaziri
1ff40343b5
Version 2.8.1.
2018-12-01 09:59:19 -08:00