Skip to content

Commit

Permalink
Stopped updating NSProgressFileTotalCountKey and NSProgressFileComple…
Browse files Browse the repository at this point in the history
…tedCountKey user info dictionary keys while extracting files, since that prevents the file name from showing in the localized description under iOS/iPadOS 15 and macOS 12
  • Loading branch information
abbeycode committed Feb 17, 2022
1 parent 997c0da commit dbedcee
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions Classes/URKArchive.mm
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ - (BOOL)extractFilesTo:(NSString *)filePath
BOOL success = [self performActionWithArchiveOpen:^(NSError **innerError) {
URKCreateActivity("Performing File Extraction");

int RHCode = 0, PFCode = 0, filesExtracted = 0;
int RHCode = 0, PFCode = 0;
URKFileInfo *fileInfo;

URKLogInfo("Extracting to %{public}@", filePath);
Expand Down Expand Up @@ -576,12 +576,7 @@ - (BOOL)extractFilesTo:(NSString *)filePath
return;
}

[progress setUserInfoObject:@(++filesExtracted)
forKey:NSProgressFileCompletedCountKey];
[progress setUserInfoObject:@(fileInfos.count)
forKey:NSProgressFileTotalCountKey];
progress.completedUnitCount += fileInfo.uncompressedSize;

URKLogDebug("Finished extracting %{public}@. Extraction %f complete", fileInfo.filename, progress.fractionCompleted);

if (progressBlock) {
Expand Down

0 comments on commit dbedcee

Please sign in to comment.