Skip to content

Commit 5589a60

Browse files
committed
Use child/parent names with paths for better clarity
1 parent 44b027a commit 5589a60

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

Sparkle/SUBinaryDeltaTool.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -212,13 +212,13 @@ int main(int __unused argc, char __unused *argv[])
212212
newTreeState[key] = info;
213213

214214
if (oldInfo && [oldInfo[@"type"] unsignedShortValue] == FTS_D && [info[@"type"] unsignedShortValue] != FTS_D) {
215-
NSArray *pathComponents = key.pathComponents;
215+
NSArray *parentPathComponents = key.pathComponents;
216216

217-
for (NSString *subpath in originalTreeState) {
218-
NSArray *subpathComponents = subpath.pathComponents;
219-
if (subpathComponents.count > pathComponents.count &&
220-
[pathComponents isEqualToArray:[subpathComponents subarrayWithRange:NSMakeRange(0, pathComponents.count)]]) {
221-
[newTreeState removeObjectForKey:subpath];
217+
for (NSString *childPath in originalTreeState) {
218+
NSArray *childPathComponents = childPath.pathComponents;
219+
if (childPathComponents.count > parentPathComponents.count &&
220+
[parentPathComponents isEqualToArray:[childPathComponents subarrayWithRange:NSMakeRange(0, parentPathComponents.count)]]) {
221+
[newTreeState removeObjectForKey:childPath];
222222
}
223223
}
224224
}

0 commit comments

Comments
 (0)