From f2b02257cc4cc5c043ceb177ae77e17f0292cace Mon Sep 17 00:00:00 2001 From: Dave Brown Date: Thu, 31 Jan 2013 12:42:29 +0900 Subject: [PATCH] Making a bunch of warnings and an error go away. Ruby 1.9.3 had a good point about "folderstyle = MBox" not actually affecting anything on account of how I was setting a local variable called that instead of the class member. But really, that complaint about indentation being slightly off? That's excessively picky. --- VERSION | 2 +- gurgitate-mail.RB | 4 ++-- gurgitate/deliver/mbox.RB | 2 +- gurgitate/deliver/mh.RB | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/VERSION b/VERSION index db77e0e..7b4d9a4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.10.5 +1.10.6 diff --git a/gurgitate-mail.RB b/gurgitate-mail.RB index c438429..89da318 100644 --- a/gurgitate-mail.RB +++ b/gurgitate-mail.RB @@ -361,7 +361,7 @@ module Gurgitate rescue Exception log "Error while executing #{configfilespec}: #{$!}" $@.each { |tr| log "Backtrace: #{tr}" } - folderstyle = MBox + folderstyle MBox save(spoolfile) end end @@ -377,7 +377,7 @@ module Gurgitate log "Error while executing rules: #{$!}" $@.each { |tr| log "Backtrace: #{tr}" } log "Attempting to save to spoolfile after error" - folderstyle = MBox + folderstyle MBox save(spoolfile) end end diff --git a/gurgitate/deliver/mbox.RB b/gurgitate/deliver/mbox.RB index 91e1bff..1f496e0 100644 --- a/gurgitate/deliver/mbox.RB +++ b/gurgitate/deliver/mbox.RB @@ -41,7 +41,7 @@ module Gurgitate f.print message f.flock(File::LOCK_UN) end - end + end end end end diff --git a/gurgitate/deliver/mh.RB b/gurgitate/deliver/mh.RB index b7014a1..6ee206c 100644 --- a/gurgitate/deliver/mh.RB +++ b/gurgitate/deliver/mh.RB @@ -24,10 +24,10 @@ module Gurgitate # I could put in a check for the path given in # $HOME/.mh_profile, but Claws-Mail uses MH mailboxes and # disregards $HOME/.mh_profile. - if File.stat(mailbox).directory? and + if( File.stat(mailbox).directory? and not ( File.exists?(File.join(mailbox, "cur")) or File.exists?(File.join(mailbox, "tmp")) or - File.exists?(File.join(mailbox, "new"))) then + File.exists?(File.join(mailbox, "new")) ) ) then return MH end rescue Errno::ENOENT