(fix) handle "username" as path

pull/203/head
Ludovic Marcotte 2016-03-18 12:50:09 -04:00
parent 510d568cb1
commit f08c718c00
1 changed files with 7 additions and 1 deletions

View File

@ -511,7 +511,13 @@ static BOOL debugLeaks;
NSRange r;
r = [path rangeOfString: @"/"];
username = [path substringWithRange: NSMakeRange(0, r.location)];
// We handle /sogo1/Calendar/.../ and "sogo1" as paths
if (r.length)
username = [path substringWithRange: NSMakeRange(0, r.location)];
else
username = path;
requestCount = [cache requestCountForLogin: username];
if (requestCount)