aboutsummaryrefslogtreecommitdiffstats
path: root/imapsync
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2015-07-30 01:16:51 +0200
committerGuilhem Moulin <guilhem@fripost.org>2015-07-30 01:27:08 +0200
commita76acfe7af03ea9087c3c063c315b52109c41f10 (patch)
treeb21a869a746d41e12c4f42e0a1dc0a5db495ee4c /imapsync
parent0c1aa3921e1736ab29caa9b77e62446c40d9214a (diff)
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.
Diffstat (limited to 'imapsync')
-rwxr-xr-ximapsync4
1 files changed, 2 insertions, 2 deletions
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();
}