Add support for a pax textended keyword, "SUN.holesdata", which describes where is
data or hole in the stored contents. The pax of Solaris records the keyword when
using -x pax option which specify a pax format, and the file is sparse.
Tim Kientzle [Tue, 12 Jul 2011 05:35:22 +0000 (01:35 -0400)]
Remove dead files.
These also apparently ruffled some feathers:
http://code.google.com/p/libarchive/issues/detail?id=162
http://bugs.debian.org/614390
http://public.kitware.com/Bug/view.php?id=11885
The same changes of In the Xar writer, ignore ineffective path names in the Xar archive
such as "." , "/" or "../" and fix that handling. This is the same as the recent changes of
the ISO9660 writer.
In the ISO writer, ignore ineffective path names in the ISO9660 file system
such as "." , "/" or "../" and fix that handling. This is to improve r3464 changes.
In the fuzz test, improve the calculation of damaging bytes so as to
make at least one byte damage of the sample file even if its size is less than 100 bytes.
Fix issue 106. The original problem happned on linux platform and I fixed it onece
in r3277 but it was not sufficient. This change consider it could happen on other
platforms that the entry object has one sparse block and it indicates the whole file
data, which sparse block is made by other program code(not only our code).
Tim Kientzle [Sun, 26 Jun 2011 04:09:09 +0000 (00:09 -0400)]
Extend the --newer-than test to verify the behavior when there's a new
file inside an old directory. Rework the descent logic in write.c
somewhat to fix the behavior here.
Fix counting files read, dot not count it up when returning ARCHIVE_EOF.
Add the check of the return value of archive_file_count() into several
format reader tests.
This is the final step to reduce use of both read() and write() system-calls in the iso9660 writer.
- Stop reading the contents of each file from the temporary file with read().
- Read the block of all file contents instead, and then write it to next stream.
This is second step to reduce use of both read() and write() system-calls in the iso9660 writer.
- Copy file contents to wbuff, 64K buffer, and then write wbuff data with write() syscall when
the buffer is full.
- Improve wbuff handling to be able to be used for zisofs accordingly.
- Stop using wbuff as read buffer in setup_boot_information() function.
This is first step to reduce use of both read() and write() system-calls in the iso9660 writer.
- Use only one temporary file to be simple structure.
- When enabling zisofs, almost all files except a small(<2048 bytes) file are, consequently,
always compressed even if it is a boot file. The boot file will be uncompressed later.
- Write those files to the temporary file by 2048 bytes, though currently this is no effect.
Shift away "tar:utf8type=libarchive2x" option which is to read a pax file made with
libarchive 2.x in a wrong assumption of a wchar_t form in non UTF-8 locale;
use "tar:compat-2x" option instead.
And also add ""cpio:compat-2x" and "zip:compat-2x" to read filenames,
which are converted with CP_ACP, in those format on Windows plaform,
although you can use "hdrcharset=CP_ACP" option.
For posix like system:
- use "tar:compat-2x" option when you get incorrect filenames from pax
files made with bsdtar/libarchive 2.x.
For Windows system:
- use "tar:compat-2x", "cpio:compat-2x" and "zip:compat-2x" options
when you get incorrect filnames from those archives(except pax format)
made with bsdtar/libarchive 2.x.
Try to use "SJIS" character-set if use of "CP932" failed and a best effort bit is on,
because all of implements of iconv do not support "CP932" character-set and
"SJIS" character-set is widely supported more than "CP932".
Set SCONV_WIN_CP flag so that we use Windows API for UTF-16BE conversion
because IsValidCodePage(CP_UTF16BE) fails but we can handle it with byte-swapping.
For Mac OS X, update comment in create_sconv_object(), and perform the normalization form C when
current locale is not UTF-8 because iconv would correctly handle filenames than those be in
UTF-8 NFD or UTF-16BE in NFD.
Rework archive_string_normalize_D() function.
- improve ConvertFromUnicodeToText() handling.
- correct a buffer size for NFD string.
- return no changed data if the conversion fails.
Use compress for test_archive_string_conversion.txt instead of gzip to work
a test test_archive_string_conversion on Windows platform, which does not
have zlib by default.
Tim Kientzle [Tue, 24 May 2011 03:22:31 +0000 (23:22 -0400)]
Issue 157: Found by GCC 4.6: The temp buffer, which was set up
specifically to avoid walking off the end of the provided input
data, wasn't being used.
Possible ramification: libarchive could segfault when writing
shar files with uuencode encoding of file bodies, if the
data being read happened to end exactly at the end of
an allocated page.
Rework UTF-16 conversion functions.
- rename strncpy_from_utf16be to strncat_from_utf16be and its feature is slightly changed as strcat.
- rename strncpy_to_utf16be to strncat_to_utf16be and its feature is slightly changed as strcat.
- use U+FFFD for invalid character if destination charset is UTF-8.
- proper handle surrogate pair on Windows version.