This adds a zipArchiveShouldUnzipFileAtIndex, which is called before
each call to zipArchiveWillUnzipFileAtIndex, allowing a delegate to
cancel the unzip progress.
This test adds a fixture RelativeSymlinks.zip with the following
structure:
RelativeSymbolicLink
├── symlinkedFile
├── symlinkedFolder
└── symlinks
├── fileSymlink -> ../symlinkedFile
└── folderSymlink -> ../symlinkedFolder
The test checks if both `fileSymlink` and `folderSymlink` still point to
the respective files in the parent directory after the fixture has been
unzipped.
See my note about ZIPs lack of documentation for symbolic links. A lot
of this seems to be trial and error on my part as the implementation
isn't documented. This seems to do the trick, however, and all of the
tests are now passing on my end.
As always, send more problems my way.
I commented out a bunch of NSLogs while debugging so I put those back
in, and fixed a bug where the test would crash if the symbolic link
failed to be created.
Adds support for ZIP files that include files that are symbolic links.
See the note in SSZipArchive.m for more information about that.
Includes a test that will probably only pass if you have GitHub for Mac
installed because that's the program I used as a test to symlink
against.
I created the symbolic link with 'ln -s /Applications/GitHub.app
SymbolicLink/GitHub.app' so I'm not entirely sure how it'll behave for
hard links, but I can't test that right now.
Fixes issues with files being truncated when their headers have values
that represent smaller uncompressed sizes then the actual data. This
generally fixes issues where the whatever program zipped the file
fucked up the headers. The fix makes ssziparchive behave like other
unzip utilities that ignore the header and decompress the actual data
until it's finished.
I've tested a bunch and all of the tests included pass, if any other
issues arrive I'd be glad to take additional time to look into it.
Includes a file, IncorrectHeaders.zip, that is a zip of a folder called
IncorrectHeaders which includes a single file, Readme.txt. I've
intentionally changed the header for that file to read 50 bytes intend
of the actual 59 for testing purposes.
* Add ARC support
* Fixes: One of the bugs is that the file modification dates for files being unzipped were wrong. Apparently the code was taking the MS-DOS date and time and treating it as an NSTimeInterval since Jan 1, 1980. This is not correct and was resulting in modification dates for me in 2014. — Brant Sears
* Fixes: The second bug was that the file modification dates for folders were showing up as the current date/time, but when I unzip the same archive using Apple's implementation of zip, the file modification dates for those folders were set sometime in the past. — Brant Sears
Basic zip files can be created (or appended to) by supplying the
path to a zip file and either paths to existing files or NSData
objects along with filenames.