diff options
Diffstat (limited to 'Functions/Calendar/calendar_edit')
-rw-r--r-- | Functions/Calendar/calendar_edit | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Functions/Calendar/calendar_edit b/Functions/Calendar/calendar_edit index 430c3b2e9..ae8885048 100644 --- a/Functions/Calendar/calendar_edit +++ b/Functions/Calendar/calendar_edit @@ -20,8 +20,10 @@ zstyle -s ':datetime:calendar:' calendar-file calendar || calendar=~/calendar # start of block for following always to clear up lockfiles. # Not needed but harmless if OS file locking is used. { - if zmodload -F zsh/system b:zsystem && zsystem supports flock; then - zsystem flock $calendar + if zmodload -F zsh/system b:zsystem && zsystem supports flock && + zsystem flock $calendar 2>/dev/null; then + # locked OK + : else calendar_lockfiles $calendar || exit 1 fi |