Skip to content

Commit 7007996

Browse files
committed
File names with whites spaces on history view
1 parent b27378f commit 7007996

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

GLFileView.m

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,11 +238,10 @@ + (NSString *)parseDiffTree:(NSString *)txt withStats:(NSMutableDictionary *)sta
238238
NSArray *lines = [txt componentsSeparatedByString:@"\n"];
239239
NSMutableString *res=[NSMutableString string];
240240
[res appendString:@"<table id='filelist'>"];
241-
int i;
242-
for (i=1; i<[lines count]; i++) {
243-
NSString *line=[lines objectAtIndex:i];
244-
NSArray *fields=[line componentsSeparatedByString:@" "];
245-
NSArray *fileStatus=[[fields objectAtIndex:4] componentsSeparatedByString:@"\t"];
241+
for (NSString *line in lines) {
242+
if([line length]<98) continue;
243+
line=[line substringFromIndex:97];
244+
NSArray *fileStatus=[line componentsSeparatedByString:@"\t"];
246245
NSString *status=[[fileStatus objectAtIndex:0] substringToIndex:1]; // ignore the score
247246
NSString *file=[fileStatus objectAtIndex:1];
248247
NSString *txt=file;

0 commit comments

Comments
 (0)