Skip to content

Commit 9236b80

Browse files
committed
Bugfix: Avoid looping while parsing the children of a tree
Happens very intermittently, readLine keeps returning "\r".
1 parent e0a3422 commit 9236b80

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

PBGitTree.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,9 @@ - (NSArray*) children
216216

217217
NSString* p = [handle readLine];
218218
while (p.length > 0) {
219+
if ([p isEqualToString:@"\r"])
220+
break;
221+
219222
BOOL isLeaf = ([p characterAtIndex:p.length - 1] != '/');
220223
if (!isLeaf)
221224
p = [p substringToIndex:p.length -1];

0 commit comments

Comments
 (0)