From 0088e0ecd15dbe81c8078bf2a4e4a2da0bf2e8ec Mon Sep 17 00:00:00 2001 From: fbt Date: Mon, 21 Nov 2016 13:40:38 +0300 Subject: [PATCH] newmail fix Signed-off-by: fbt --- mod/newmail | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mod/newmail b/mod/newmail index bc8fc50..971f7ba 100644 --- a/mod/newmail +++ b/mod/newmail @@ -4,9 +4,9 @@ class NewMail < Worker def mainloop() while true do if unread_mail? - self.write "%{F#{@my_config['ok_colour']}}#{@my_config['ok_message']}%{F-}" - else self.write "%{F#{@my_config['crit_colour']}}#{@my_config['crit_message']}%{F-}" + else + self.write "%{F#{@my_config['ok_colour']}}#{@my_config['ok_message']}%{F-}" end sleep(3) @@ -15,7 +15,7 @@ class NewMail < Worker def unread_mail? @my_config['maildirs'].each do |dir| - if (Dir.entries(dir + "/new") - [ '.', '..' ]).empty? + if not (Dir.entries(dir + "/new") - [ '.', '..' ]).empty? return true end end