newmail fix
Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
parent
685d0a04d2
commit
0088e0ecd1
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user