(fix) handle "username" as path

This commit is contained in:
Ludovic Marcotte
2016-03-18 12:50:09 -04:00
parent 510d568cb1
commit f08c718c00

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)