aboutsummaryrefslogtreecommitdiffstats
path: root/interimap
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2015-09-13 13:37:50 +0200
committerGuilhem Moulin <guilhem@fripost.org>2015-09-13 14:47:00 +0200
commita4729170cffc902319b08bae86e1ab6e20a7939d (patch)
tree11a55937493cf036c2c199842076a83173d7a70a /interimap
parentcd7d385b4a27d028a7c7f92e1cd781b65b8ca5eb (diff)
Fix detection of boolean options.
Diffstat (limited to 'interimap')
-rwxr-xr-xinterimap4
1 files changed, 2 insertions, 2 deletions
diff --git a/interimap b/interimap
index 4a8bde4..1535739 100755
--- a/interimap
+++ b/interimap
@@ -249,7 +249,7 @@ foreach my $name (qw/local remote/) {
$config{enable} = 'QRESYNC';
$config{name} = $name;
$config{'logger-fd'} = $LOGGER_FD if defined $LOGGER_FD;
- $config{'compress'} //= ($name eq 'local' ? 'NO' : 'YES');
+ $config{'compress'} //= ($name eq 'local' ? 0 : 1);
$IMAP->{$name} = { client => Net::IMAP::InterIMAP::->new(%config) };
my $client = $IMAP->{$name}->{client};
@@ -514,7 +514,7 @@ sub sync_mailbox_list() {
sync_mailbox_list();
($lIMAP, $rIMAP) = map {$IMAP->{$_}->{client}} qw/local remote/;
my $ATTRS = 'MODSEQ FLAGS INTERNALDATE '.
- (((!defined $CONF->{_} or uc ($CONF->{_}->{'use-binary'} // 'YES') eq 'YES') and
+ (((!defined $CONF->{_} or $CONF->{_}->{'use-binary'} // 1) and
!$lIMAP->incapable('BINARY') and !$rIMAP->incapable('BINARY'))
? 'BINARY' : 'BODY').'.PEEK[]';