From a76acfe7af03ea9087c3c063c315b52109c41f10 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Thu, 30 Jul 2015 01:16:51 +0200 Subject: Add a $try parameter to create, delete, rename, etc. And no longer crash when trying to create a mailbox that already exists. This could happen for instance if list-select-opts contains 'SUBSCRIBE' and the mailbox is not subscribed on one side. --- imapsync | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'imapsync') diff --git a/imapsync b/imapsync index 9bcc7b5..45b214f 100755 --- a/imapsync +++ b/imapsync @@ -471,7 +471,7 @@ my @MAILBOXES; } my $subscribed = mbx_subscribed('local', $mailbox); $STH_INSERT_MAILBOX->execute($mailbox, $subscribed); - $IMAP->{remote}->{client}->create($mailbox); + $IMAP->{remote}->{client}->create($mailbox, 1); $IMAP->{remote}->{client}->subscribe($mailbox) if $subscribed; $DBH->commit(); } @@ -483,7 +483,7 @@ my @MAILBOXES; } my $subscribed = mbx_subscribed('remote', $mailbox); $STH_INSERT_MAILBOX->execute($mailbox, $subscribed); - $IMAP->{local}->{client}->create($mailbox); + $IMAP->{local}->{client}->create($mailbox, 1); $IMAP->{local}->{client}->subscribe($mailbox) if $subscribed; $DBH->commit(); } -- cgit v1.2.3