summaryrefslogtreecommitdiffstats
path: root/lib/App
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2018-07-17 16:06:37 +0200
committerFlorian Pritz <bluewind@xinu.at>2018-07-17 16:07:38 +0200
commit33fb0a750ae4b0bb9adb0fe288b4723c1a01fc3a (patch)
treec0d97809eb89ea1b202243e1887d994294d886e2 /lib/App
parent6a65dcf898c62455109b92386758b0d9dcc35e66 (diff)
downloadApp-ImapNotify-33fb0a750ae4b0bb9adb0fe288b4723c1a01fc3a.tar.gz
App-ImapNotify-33fb0a750ae4b0bb9adb0fe288b4723c1a01fc3a.tar.xz
ImapNotify: Clean line before logging in loop()
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'lib/App')
-rw-r--r--lib/App/ImapNotify.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/App/ImapNotify.pm b/lib/App/ImapNotify.pm
index 0b44f68..1445c13 100644
--- a/lib/App/ImapNotify.pm
+++ b/lib/App/ImapNotify.pm
@@ -65,14 +65,14 @@ method loop() {
$log->info("Waiting for notify events");
while (my $line = $imap->readline_timeout()) {
- $log->tracef("Got line: '%s'", $line);
+ $log->tracef("Got line: '%s'", $line =~ s/\r\n$//r);
if ($line =~ m/^\* .* FETCH /) {
my $message = $imap->handle_fetch($line);
$self->_notify($message);
next;
}
if ($line =~ m/^\* STATUS (?<mailbox>[^ ]+) \(MESSAGES \d+ UIDNEXT (?<uidnext>\d+) UNSEEN \d+\)/) {
- $log->debugf("Got status change: '%s'", $line);
+ $log->debugf("Got status change: '%s'", $line =~ s/\r\n$//r);
my $mailbox = $+{mailbox};
my $uid = $+{uidnext} - 1;
#$imap2->select($mailbox);