File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments