diff --git a/ActiveSync/SOGoActiveSyncDispatcher.m b/ActiveSync/SOGoActiveSyncDispatcher.m index a6a9eb384..7f58e420a 100644 --- a/ActiveSync/SOGoActiveSyncDispatcher.m +++ b/ActiveSync/SOGoActiveSyncDispatcher.m @@ -1968,9 +1968,12 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. if ([parts count] == 5) { /* If "OCSFolderInfoURL" is properly configured, we must have 5 - parts in this url. */ + parts in this url. We strip the '-' character in case we have + this in the domain part - like foo@bar-zot.com */ ocFSTableName = [NSString stringWithFormat: @"sogo_cache_folder_%@", - [[user loginInDomain] asCSSIdentifier]]; + [[[user loginInDomain] asCSSIdentifier] + stringByReplacingOccurrencesOfString: @"-" + withString: @"_"]]; [parts replaceObjectAtIndex: 4 withObject: ocFSTableName]; folderTableURL = [NSURL URLWithString: [parts componentsJoinedByString: @"/"]];