mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-28 05:14:34 +00:00
Use child/parent names with paths for better clarity
This commit is contained in:
1 parent
44b027a178
commit
5589a604b8
1 file changed
+6
-6
Vendored
+6
-6
@@ -212,13 +212,13 @@ int main(int __unused argc, char __unused *argv[])
|
||||
newTreeState[key] = info;
|
||||
|
||||
if (oldInfo && [oldInfo[@"type"] unsignedShortValue] == FTS_D && [info[@"type"] unsignedShortValue] != FTS_D) {
|
||||
NSArray *pathComponents = key.pathComponents;
|
||||
NSArray *parentPathComponents = key.pathComponents;
|
||||
|
||||
for (NSString *subpath in originalTreeState) {
|
||||
NSArray *subpathComponents = subpath.pathComponents;
|
||||
if (subpathComponents.count > pathComponents.count &&
|
||||
[pathComponents isEqualToArray:[subpathComponents subarrayWithRange:NSMakeRange(0, pathComponents.count)]]) {
|
||||
[newTreeState removeObjectForKey:subpath];
|
||||
for (NSString *childPath in originalTreeState) {
|
||||
NSArray *childPathComponents = childPath.pathComponents;
|
||||
if (childPathComponents.count > parentPathComponents.count &&
|
||||
[parentPathComponents isEqualToArray:[childPathComponents subarrayWithRange:NSMakeRange(0, parentPathComponents.count)]]) {
|
||||
[newTreeState removeObjectForKey:childPath];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user