From b24d545294507a5af5a63880282247042d934c9e Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 10 Jan 2008 18:53:49 +0000 Subject: users/12412: check for extra arguments in test and [ --- Functions/Calendar/calendar_add | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Functions/Calendar') diff --git a/Functions/Calendar/calendar_add b/Functions/Calendar/calendar_add index e8c535d59..04401bc9f 100644 --- a/Functions/Calendar/calendar_add +++ b/Functions/Calendar/calendar_add @@ -74,7 +74,7 @@ fi if [[ -n $reply[rpttime] && $line = ${~uidpat} ]]; then # Yes, so record this as a recurring event. their_uid=${(U)match[1]} - recurring_uids[$their_uid]=1 + recurring_uids[$their_uid]=$reply[time] fi done fi @@ -113,6 +113,11 @@ fi # No, so assume this is a straightforward replacement # of a non-recurring event. (( ! old_recurring )) && continue + # It's recurring, but if this is a one-off at the + # same time as the previous one, replace anyway. + [[ -z $parse_old[$rpttime] ]] && + (( ${parse_new[time]} == ${parse_old[time]} )) && + continue fi fi fi -- cgit 1.4.1