Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix uznipping.

  • Loading branch information...
commit 7110728279d11e39d299e5eaf8336578fb3aa98b 1 parent 934c0df
Pavel Kunc authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  PKToolbox/Sources/Foundation/PKZipUnarchiver.m
2  PKToolbox/Sources/Foundation/PKZipUnarchiver.m
View
@@ -82,7 +82,7 @@ - (BOOL)unzipTo:(NSString *)aDestination error:(NSError **)outError {
NSUInteger bytesRead = 0;
NSFileHandle *fileHandle = [NSFileHandle fileHandleForWritingAtPath:currentFilePath];
- NSMutableData *buffer = [[NSMutableData alloc] initWithCapacity:PK_ZIPUNARCHIVER_BUFFER_SIZE];
+ NSMutableData *buffer = [[NSMutableData alloc] initWithLength:PK_ZIPUNARCHIVER_BUFFER_SIZE];
while ((bytesRead = [file readDataWithBuffer:buffer error:outError]) != 0) {
[buffer setLength:bytesRead];
[fileHandle writeData:buffer];
Please sign in to comment.
Something went wrong with that request. Please try again.