Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions DCTar.m
Original file line number Diff line number Diff line change
Expand Up @@ -312,10 +312,11 @@ +(BOOL)untarObject:(id)tarObject size:(unsigned long long)size toPath:(NSString*
//NSLog(@"file created: %@",name);

if(size == 0) {
[@"" writeToFile:filePath atomically:YES encoding:NSUTF8StringEncoding error:error];
[@"" writeToFile:filePath atomically:YES encoding:NSUTF8StringEncoding error:nil];
} else {
blockCount += (size - 1) / TAR_BLOCK_SIZE + 1; // size/TAR_BLOCK_SIZE rounded up
}

blockCount += (size - 1) / TAR_BLOCK_SIZE + 1; // size/TAR_BLOCK_SIZE rounded up
[self writeFileDataForObject:tarObject atLocation:(location + TAR_BLOCK_SIZE) withLength:size atPath:filePath];

} else if(type == '5') {
Expand Down