mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-24 04:38:16 +00:00
Merge pull request #513 from zorgiepoo/binary-delta-case-issue
Fix BinaryDelta failing on filenames changing case
This commit is contained in:
commit
09d98932d9
1 file changed
+10
-1
Vendored
+10
-1
@@ -240,7 +240,16 @@ int main(int __unused argc, char __unused *argv[])
|
||||
NSOperationQueue *deltaQueue = [[NSOperationQueue alloc] init];
|
||||
NSMutableArray *deltaOperations = [NSMutableArray array];
|
||||
|
||||
NSArray *keys = [[newTreeState allKeys] sortedArrayUsingSelector:@selector(compare:)];
|
||||
// Sort the keys by preferring the ones from the original tree to appear first
|
||||
// We want to enforce deleting before extracting in the case paths differ only by case
|
||||
NSArray *keys = [[newTreeState allKeys] sortedArrayUsingComparator:^NSComparisonResult(NSString *key1, NSString *key2) {
|
||||
NSComparisonResult insensitiveCompareResult = [key1 caseInsensitiveCompare:key2];
|
||||
if (insensitiveCompareResult != NSOrderedSame) {
|
||||
return insensitiveCompareResult;
|
||||
}
|
||||
|
||||
return originalTreeState[key1] ? NSOrderedAscending : NSOrderedDescending;
|
||||
}];
|
||||
for (NSString* key in keys) {
|
||||
id value = [newTreeState valueForKey:key];
|
||||
|
||||
|
||||
Reference in new issue
Block a user