Skip to content

Commit 6e06e4b

Browse files
brotherbarddgrijalva
authored andcommitted
Bugfix: Avoid looping while parsing the children of a tree
Happens very intermittently, readLine keeps returning "\r".
1 parent 5ea536b commit 6e06e4b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

PBGitTree.m

+2
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,8 @@ - (NSArray*) children
216216

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

0 commit comments

Comments
 (0)