Stephen Seo [Fri, 18 Apr 2025 07:57:50 +0000 (16:57 +0900)]
Fix file format 4 archive creation
Previous implementation errored out by mistake when counts were at least
2^32 in size, since file format 4 should support 64-bit (8-byte) counts
of file-count-size, chunk-count-size, and directory-count-size.
Stephen Seo [Fri, 18 Apr 2025 07:37:36 +0000 (16:37 +0900)]
Fix potential uninitialized variable warning
Code logic ensures that the variable is already set to a value where the
warning occurs (sometimes), but for now, just initialize to zero to
inhibit the warning.
Stephen Seo [Wed, 9 Apr 2025 09:52:27 +0000 (18:52 +0900)]
Fix bug where writing to archive fails sometimes
Written bytes was not correctly calculated because it was not checking
against actual written-byte count, but was erronously using the prior
read-byte count.
Stephen Seo [Thu, 27 Feb 2025 01:31:58 +0000 (10:31 +0900)]
Add "--force-tmpfile"
"--force-tmpfile" forces the use of "tmpfile()" instead of a file
created in the default directory for temporary files (which is currently
the same directory as the currently created archive) when using
compression.
Note that this option is mutually exclusive with "--temp-files-dir".
Stephen Seo [Wed, 26 Feb 2025 09:42:45 +0000 (18:42 +0900)]
Set umask on compression-temp-file
Previous behavior created temp files (for compression) with default
permissions. This commit uses umask to keep only permissions for the
user and deny permissions to others (and restores the umask after
creation of the temp file).
Stephen Seo [Tue, 25 Feb 2025 08:49:31 +0000 (17:49 +0900)]
Impl. file format v 4 write
This is actually part of an original commit that was broken into two
pieces due to weird git shennanigans (newly added code was not properly
"diff"ed by git).
Stephen Seo [Tue, 25 Feb 2025 08:46:22 +0000 (17:46 +0900)]
Impl. file format v 4 parsing
This is actually part of an original commit that was broken into two
pieces due to weird git shennanigans (newly added code was not properly
"diff"ed by git).
Stephen Seo [Fri, 21 Feb 2025 07:26:32 +0000 (16:26 +0900)]
Fix/refactor created temp file when compressing
Before this commit, archived files using compression would use a
temporary file in the current-working-directory (usually the same
directory specified by "-C <dir>") to store compressed files. This is
required by design as the file-size of the compressed file/chunk is
required before storing the data. In other words, the size is stored
before the data without seeking so that output can be streamable (in
case of "-f -" or "-f /dev/stdout" when compressing).
This commit changes the behavior of creating temporary files for
compression by placing them in the same directory as the output file
(specified by "-f <output_file>"), or using "tmpfile()" if that should
fail. Note that the `--temp-files-dir <dir>` option exists, and
"tmpfile()" is used as a fallback in case writing to
`--temp-files-dir <dir>` fails.
Stephen Seo [Mon, 17 Feb 2025 07:52:34 +0000 (16:52 +0900)]
Impl. setting version.h from CMake
Previous implementation only updated the version if the CMakeLists.txt
file was updated. This now auto-generates the version into version.h in
every build.
Stephen Seo [Mon, 17 Feb 2025 07:52:34 +0000 (16:52 +0900)]
Impl. setting version.h from CMake
Previous implementation only updated the version if the CMakeLists.txt
file was updated. This now auto-generates the version into version.h in
every build.
Stephen Seo [Mon, 17 Feb 2025 06:29:18 +0000 (15:29 +0900)]
WIP white/black-list: Fix b-contains behavior
Up to this commit, --blacklist-contains would blacklist any entry that
matches any <text>.
This behavior has been changed to only blacklist any entry that contains
all <text> entries specified by multiple --blacklist-contains (or just 1
if there was only 1 flag).
TODO:
- white/black-lists for test/extract for file format version 1 and
2.
- white/black-lists for create/test/extract for file format version
0.
Stephen Seo [Mon, 17 Feb 2025 04:29:14 +0000 (13:29 +0900)]
WIP white/black-list: Impl. for create v 1,2,3
Implements white/black-listing files for archive creation for file
formats 1, 2, and 3.
TODO:
- white/black-listing files for archive test and extract for file
format versions 1, 2, and 3.
- white/black-listing files for archive create, test, and extract
for file format version 0.