pk / pktoolbox Goto Github PK
View Code? Open in Web Editor NEWRandom junk handy for iOS development.
License: MIT License
Random junk handy for iOS development.
License: MIT License
The intermediate files are not created while unzipping files. If the ZIP file contains directories, everything works as expected. But if the ZIP utility has not added entries for the intermediate directories, unzipping fails.
usually common command line tools to create zip files omit adding
directory names to the zip file. They are not necessary because
non empty directories can be derived from the file paths.
Previous unzipping in PKZipUnarchiver failed to unzip files if
the directories are not present in the ZIP file. Thus zipping on
the command line under Windows/Linux/MacOS produced an
incompatible ZIP file, espacially if just some files are added
to the ZIP file for incremental updates instead of the whole
directory.
This fix forces the creation of directories prior to unzipping
the files.
PKToolbox/Sources/Foundation/PKZipUnarchiver.m | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/PKToolbox/Sources/Foundation/PKZipUnarchiver.m b/PKToolbox/Sources/Foundation/PKZipUnarchiver.m
index aa61991..9202d6a 100644
--- a/PKToolbox/Sources/Foundation/PKZipUnarchiver.m
+++ b/PKToolbox/Sources/Foundation/PKZipUnarchiver.m
@@ -76,6 +76,11 @@
attributes:nil
error:outError];
} else {
[fileManager createDirectoryAtPath:[currentFilePath stringByDeletingLastPathComponent]
withIntermediateDirectories:YES
attributes:nil
error:outError];
[fileManager createFileAtPath:currentFilePath
contents:nil
attributes:nil];
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.