Commit graph

559 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
214957c269 ADD: Sample wcx-plugin 2026-03-16 17:07:02 +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
9370d9ec7c FIX: Wrong "From" path when copying from .b64 (issue #1639) 2025-11-03 14:18:22 +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
e192d3b8bd FIX: Use _SC_NPROCESSORS_CONF constant 2025-09-14 01:46:08 +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
e682a876de ADD: SevenZip - check library version 2025-01-19 16:55:43 +03:00
j2969719
5b04565930
UPD: Use -sfx switch for rar (#1996) 2024-12-08 19:55:11 +03:00
VenusGirl❤
beb512835e
UPD: Korean language files (#1993) 2024-11-30 22:11:15 +03:00
Alexander Koblov
01420e301e DEL: Unused files 2024-11-29 21:02:49 +03:00
Alexander Koblov
8b8dff2137 FIX: SevenZip - crash on exit 2024-11-26 00:02:44 +03:00
Alexander Koblov
6ec5f573b9 ADD: RPM - dependencies information 2024-11-24 14:37:13 +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
5736695059 ADD: SevenZip - language files 2024-11-18 20:12:02 +03:00
Alexander Koblov
27e6888b2c ADD: SevenZip - translate resource strings 2024-11-17 23:57:15 +03:00
Alexander Koblov
16756b6362 FIX: SevenZip - configuration dialog TAB order 2024-11-17 21:37:54 +03:00
Alexander Koblov
38abc6ffc4 UPD: SevenZip - move initialization to ExtensionInitialize procedure 2024-11-17 21:31:29 +03:00
Alexander Koblov
566d2397bf ADD: SevenZip - new archive formats (v15.14) 2024-11-17 21:10:52 +03:00
Alexander Koblov
f827859854 FIX: SevenZip - extract empty files (issue #1672) 2024-11-17 18:20:53 +03:00
Alexander Koblov
1521d9dfda FIX: SevenZip - memory leak 2024-11-17 18:19:05 +03:00
Alexander Koblov
e5f21889fe ADD: SevenZip - new archive formats (v15.14) 2024-11-17 17:57:05 +03:00
Alexander Koblov
ef6d192b0f ADD: SevenZip - Unix support 2024-11-17 16:45:10 +03:00
Alexander Koblov
59517f8caa UPD: SevenZip - prepare Unix support (step 8) 2024-11-17 16:18:55 +03:00
Alexander Koblov
eb00ca2cf5 UPD: SevenZip - prepare Unix support (step 7) 2024-11-12 20:00:51 +03:00
Alexander Koblov
5c6b46f892 UPD: SevenZip - prepare Unix support (step 6) 2024-11-10 19:44:46 +03:00
Alexander Koblov
86b19c2b10 UPD: SevenZip - prepare Unix support 2024-11-10 18:28:30 +03:00
Alexander Koblov
f2b3345653 UPD: SevenZip - prepare Unix support 2024-11-10 15:55:45 +03:00
Alexander Koblov
9066702bc4 UPD: SevenZip - prepare Unix support 2024-11-10 13:33:05 +03:00
Alexander Koblov
057eb0ac96 FIX: SevenZip - get directory attributes 2024-11-10 13:29:14 +03:00
Alexander Koblov
36378feaa6 ADD: SevenZip - long file name support 2024-11-04 21:27:21 +03:00