Permalink
Browse files

Fix uznipping.

  • Loading branch information...
1 parent 934c0df commit 7110728279d11e39d299e5eaf8336578fb3aa98b @pk committed Oct 27, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 PKToolbox/Sources/Foundation/PKZipUnarchiver.m
View
2 PKToolbox/Sources/Foundation/PKZipUnarchiver.m
@@ -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];

0 comments on commit 7110728

Please sign in to comment.