mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-21 14:22:44 +00:00
(fix) remove any trailing cr (fixes #4172)
This commit is contained in:
@@ -165,7 +165,7 @@ static NSArray *photoTags = nil;
|
||||
id value;
|
||||
|
||||
NSRange r;
|
||||
int i, j, count, linesCount;
|
||||
int i, j, count, linesCount, len;
|
||||
int rc;
|
||||
|
||||
folder = [self clientObject];
|
||||
@@ -184,6 +184,11 @@ static NSArray *photoTags = nil;
|
||||
for (j = 0; j < linesCount; j++)
|
||||
{
|
||||
line = [lines objectAtIndex: j];
|
||||
len = [line length];
|
||||
|
||||
/* we check for trailing \r and we strip them */
|
||||
if (len && [line characterAtIndex: len-1] == '\r')
|
||||
line = [line substringToIndex: len-1];
|
||||
|
||||
/* skip embedded comment lines */
|
||||
if ([line hasPrefix: @"#"])
|
||||
|
||||
Reference in New Issue
Block a user