aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-ximapsync2
-rw-r--r--lib/Net/IMAP/Sync.pm4
2 files changed, 3 insertions, 3 deletions
diff --git a/imapsync b/imapsync
index 705ad3d..5be570e 100755
--- a/imapsync
+++ b/imapsync
@@ -727,7 +727,7 @@ sub sync_messages($$) {
# new mailbox
if (!defined $$idx) {
- my $subscribed = grep { $_ eq $mailbox} @SUBSCRIPTIONS ? 1 : 0;
+ my $subscribed = (grep { $_ eq $mailbox} @SUBSCRIPTIONS) ? 1 : 0;
$STH_NEWMAILBOX->execute($mailbox, $subscribed);
$STH_GET_INDEX->execute($mailbox);
($$idx) = $STH_GET_INDEX->fetchrow_array();
diff --git a/lib/Net/IMAP/Sync.pm b/lib/Net/IMAP/Sync.pm
index b952546..ad7b2f5 100644
--- a/lib/Net/IMAP/Sync.pm
+++ b/lib/Net/IMAP/Sync.pm
@@ -321,7 +321,7 @@ sub new($%) {
$self->fail("Logins are disabled.") if grep {$_ eq 'LOGINDISABLED'} @caps;
my @mechs = grep defined, map { /^AUTH=(.+)/ ? $1 : undef } @caps;
- my $mech = (grep defined, map {my $m = $_; grep {$m eq $_} @mechs ? $m : undef}
+ my $mech = (grep defined, map {my $m = $_; (grep {$m eq $_} @mechs) ? $m : undef}
split(/ /, $self->{auth}))[0];
$self->fail("Failed to choose an authentication mechanism") unless defined $mech;
@@ -847,7 +847,7 @@ sub pull_updates($) {
# do that afterwards since the UID FETCH command above can produce VANISHED responses
my %vanished = map {$_ => 1} @{$self->{_VANISHED}};
- my @vanished = keys %vanished;
+ @vanished = keys %vanished;
$self->{_VANISHED} = [];
# ignore FLAG updates on VANISHED messages