Commit graph

319 commits

Author SHA1 Message Date
EH
6123a21ed0
FIX: Zip plugin - allow cancelling TAR archive packing mid-operation (#2874)
* FIX: zip plugin - allow cancelling TAR archive packing mid-operation

TAbTarArchive.SaveArchive iterated all items without ever checking
the abort flag, making it impossible to cancel a TAR/TGZ/TBZ2 pack
operation until all files had been written.

Add a DoArchiveProgress call with abort check after each item in the
save loop, identical to the pattern already used in TAbZipArchive.SaveArchive
(abziptyp.pas) and in all extract loops (abarctyp.pas).

When the user cancels, EAbUserAbort is raised, caught in PackFilesW,
and the incomplete archive is deleted if it did not exist before packing.

* FIX: zip plugin - prevent crash on TAR abort inside GZip archive

When TAbUserAbort propagates out of TAbTarArchive.SaveArchive (e.g.
from the abort check added to the save loop), it exits the IsGzippedTar
branch of TAbGzipArchive.SaveArchive without calling SwapToGzip. The
outer finally block then compares FStream (which equals FTarStream,
possibly nil) with NewStream (FGzStream) and incorrectly frees
NewStream. The destructor later calls SwapToGzip (restoring FStream to
the already-freed FGzStream) and then frees FStream a second time,
causing an access violation.

Fix: compare FGzStream instead of FStream in the finally condition.
FGzStream always holds the original gzip stream reference and is never
changed by SwapToTar/SwapToGzip, so the NewStream ownership check is
correct regardless of which swap state the archive is in.

---------

Co-authored-by: heredie <heredie@localhost>
2026-05-23 12:12:23 +03:00
Alexander Koblov
2b0d593338 UPD: Zip - set owner/group before mode 2026-03-18 20:24:52 +03:00
Alexander Koblov
3c19843873 ADD: Zip - restore owner when extract from TAR archive (Unix) 2026-03-17 22:45:01 +03:00
Alexander Koblov
a8ebb41c81 FIX: CanYouHandleThisFile function result type 2026-03-16 16:23:12 +03:00
Alexander Koblov
f2eb7513c8 FIX: Zip - remove a partial archive on cancel (fixes #1260) 2026-02-14 15:13:03 +03:00
Alexander Koblov
0524bcd4e8 FIX: Zip - extract Unix symbolic links under Windows (fixes #2659) 2026-01-17 16:55:28 +03:00
Alexander Koblov
396d7b541a UPD: Zip - Better suspicious symbolic links handling 2025-11-04 15:05:06 +03:00
Alexander Koblov
344b0b786b FIX: Zip - When reading archives replace relative paths by underlines 2025-11-02 13:46:22 +03:00
Alexander Koblov
520c66620e UPD: Zip - Do not extract symbolic links that point outside the target directory 2025-11-02 13:46:21 +03:00
rich2014
632c724605 FIX: zip plugins compile error on UNIX(and not Linux), issue #2571 2025-10-27 15:23:13 +08:00
Alexander Koblov
a8e1440aea ADD: Zip - more accurate time support (fixes #2555) 2025-10-25 21:38:27 +03:00
Alexander Koblov
4b4b38eb97 FIX: Zip - synchronize central directory header with local file header (fixes #2542) 2025-10-13 21:58:14 +03:00
Alexander Koblov
21a7e06543 ADD: Zip - extract from brotli compressed files (.br) 2025-09-20 22:12:38 +03:00
Alexander Koblov
3ad188b21f ADD: Zip - Brotli decompression support 2025-09-20 17:07:25 +03:00
Alexander Koblov
84c311a648 FIX: Zip - progress calculation 2025-09-15 20:21:23 +03:00
Alexander Koblov
62843e9999 ADD: Zip - don't show file size for files which don't have a size (issue #2497) 2025-09-14 00:29:30 +03:00
Alexander Koblov
ea52d64c6e FIX: Create a symbolic link when extract a ZIP-archive under Windows (issue #2298) 2025-05-08 12:20:40 +03:00
Alexander Koblov
30e0176b75 UPD: Zip - refactoring 2025-02-02 14:51:21 +03:00
Alexander Koblov
054cebe599 FIX: Zip - Invalid pointer operation 2025-01-30 22:06:28 +03:00
Alexander Koblov
dcde783795 UPD: Zip - speed up .zip extraction 2025-01-30 21:51:27 +03:00
Alexander Koblov
255ecc7bda DEL: Obsolete units 2025-01-30 21:03:25 +03:00
Alexander Koblov
4fe27b1287 FIX: Zip - Use new Deflate64 decoder (fixes #2115) 2025-01-27 23:26:32 +03:00
Alexander Koblov
5b60341ad7 ADD: Zip - New Deflate64 decoder (issue #2115) 2025-01-26 19:10:51 +03:00
Alexander Koblov
01420e301e DEL: Unused files 2024-11-29 21:02:49 +03:00
Alexander Koblov
5405d59451 UPD: Zip - create TAR arcives in the GNU format by default 2024-11-23 16:20:05 +03:00
Alexander Koblov
275d06df1b UPD: German language files 2024-11-03 23:44:51 +03:00
Alexander Koblov
81af12959d FIX: Access Violation when open TAR archive (fixes #1849) 2024-09-22 13:08:58 +03:00
Alexander Koblov
752d3c9f23 FIX: Zip - crash on file replace with some .tar archives (fixes #1744) 2024-07-14 14:43:20 +03:00
Alexander Koblov
d0f9193461 ADD: Zip - more accurate time support (fixes #1700) 2024-06-16 15:06:02 +03:00
Alexander Koblov
8725b8ceac FIX: Cannot delete a file from .tar.bz2 archive (fixes #1582) 2024-04-16 17:58:01 +03:00
Alexander Koblov
5a48d0b603 ADD: Ability to handle long paths for zip archiver (issue #1581) 2024-04-15 20:43:54 +03:00
Alexander Koblov
0bed1bda2d UPD: Zip - speed up .zip creation 2024-04-09 20:56:13 +03:00
Alexander Koblov
6e413a96dc FIX: Warnings 2024-04-06 13:38:58 +03:00
Alexander Koblov
6c84cb59d6 FIX: Open .tar.gz archives 2024-03-09 12:40:20 +03:00
Alexander Koblov
bcf728ee89 ADD: Zip - optimize .tar.gz handling (fixes #471) 2024-03-05 22:10:09 +03:00
Alexander Koblov
05b14ee6c4 FIX: Zip - open .bz2, .xz and .zst archives 2024-03-04 18:31:21 +03:00
Alexander Koblov
2927a95b64 UPD: Zip - refactoring 2024-03-03 14:35:56 +03:00
Alexander Koblov
8374f75385 Revert "ADD: Zip - determine tarballs with double extension"
This reverts commit 4fe92d8254.
2024-03-02 19:40:27 +03:00
Alexander Koblov
4fe92d8254 ADD: Zip - determine tarballs with double extension 2024-03-02 17:54:13 +03:00
Alexander Koblov
4e4887033e ADD: Zip - optimize tarballs handling (fixes #458) 2024-03-02 17:49:03 +03:00
Alexander Koblov
cf2bf7f7f0 UPD: Project files 2024-02-27 20:52:37 +03:00
Alexander Koblov
192ccfd999 ADD: Extract Zstandard archives with a large dictionary 2024-01-20 14:49:02 +03:00
VenusGirl❤
f693b23df2
ADD: Korean language file zip.ko.po (#1414) 2023-12-25 22:12:02 +03:00
Alexander Koblov
be9ccaa59e FIX: Zip - Don't set attributes when extract symbolic links (fixes #1393) 2023-12-16 14:43:10 +03:00
Alexander Koblov
a6cdf056fc FIX: Bug [0002348] Cannot open empty zip files 2023-12-13 20:29:23 +03:00
Alexander Koblov
950c479527 UPD: Rename DCPcrypt to KAScrypt 2023-12-04 20:25:15 +03:00
Alexander Koblov
0d97682dc6 FIX: Plugins under Haiku x86_64 (workaround) 2023-11-19 14:50:42 +03:00
Alexander Koblov
f5539c640a FIX: Cannot extract symbolic links from ZIP archives (fixes #1332) 2023-11-04 13:55:02 +03:00
Alexander Koblov
d5f3755e61 FIX: Cannot extract symbolic links from ZIP archives (fixes #1332) 2023-11-04 13:24:29 +03:00
Alexander Koblov
d8bc7ce213 UPD: TXzDecompressionStream.Seek function 2023-10-09 19:45:44 +03:00