From 7007996c08ce2bf46649ef3c01c4d2c2b6b4ae49 Mon Sep 17 00:00:00 2001 From: German Laullon Date: Wed, 5 Jan 2011 21:06:51 -0800 Subject: [PATCH] File names with whites spaces on history view --- GLFileView.m | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/GLFileView.m b/GLFileView.m index 3c114f2..3fa1ee8 100644 --- a/GLFileView.m +++ b/GLFileView.m @@ -238,11 +238,10 @@ NSArray *lines = [txt componentsSeparatedByString:@"\n"]; NSMutableString *res=[NSMutableString string]; [res appendString:@""]; - int i; - for (i=1; i<[lines count]; i++) { - NSString *line=[lines objectAtIndex:i]; - NSArray *fields=[line componentsSeparatedByString:@" "]; - NSArray *fileStatus=[[fields objectAtIndex:4] componentsSeparatedByString:@"\t"]; + for (NSString *line in lines) { + if([line length]<98) continue; + line=[line substringFromIndex:97]; + NSArray *fileStatus=[line componentsSeparatedByString:@"\t"]; NSString *status=[[fileStatus objectAtIndex:0] substringToIndex:1]; // ignore the score NSString *file=[fileStatus objectAtIndex:1]; NSString *txt=file;