Skip to content

Commit

Permalink
(fix) append .ics extension if not present when importing events (fix…
Browse files Browse the repository at this point in the history
…es #2308)
  • Loading branch information
extrafu committed Dec 21, 2016
1 parent 1da36a3 commit 457fccd
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions SoObjects/Appointments/SOGoAppointmentFolder.m
Expand Up @@ -3237,6 +3237,12 @@ - (NSString *) importComponent: (iCalEntityObject *) event
}
}

// If the UID isn't ending with the ".ics" extension, let's add it to avoid
// confusing broken CalDAV client (like Nokia N9 and Korganizer) that relies
// on this (see #2308)
if (![[uid lowercaseString] hasSuffix: @".ics"])
uid = [NSString stringWithFormat: @"%@.ics", uid];

object = [SOGoAppointmentObject objectWithName: uid
inContainer: self];
[object setIsNew: YES];
Expand Down Expand Up @@ -3400,8 +3406,7 @@ - (int) importCalendar: (iCalCalendar *) calendar
timezone: timezone]))
{
imported++;
[uids setValue: uid
forKey: originalUid];
[uids setValue: uid forKey: originalUid];
}
}

Expand Down

0 comments on commit 457fccd

Please sign in to comment.