]> git.notmuchmail.org Git - sup/commitdiff
added default maildir mtimes for earlier sources.yaml files
authorGrant Hollingworth <grant@antiflux.org>
Mon, 26 May 2008 13:07:09 +0000 (09:07 -0400)
committerWilliam Morgan <w@masanjin.net>
Fri, 30 May 2008 15:27:33 +0000 (15:27 +0000)
Fixes a bug introduced by 2e06f1eb. The YAML loading was explicitly passing
nil, overriding the {} default in initialize.

lib/sup/maildir.rb

index 0a86cb6f373a2f0b33180b9e6665327010ff9d74..74a3e02554c7eed68ce29de41c71e1417b669fed 100644 (file)
@@ -30,7 +30,7 @@ class Maildir < Source
     #the mtime from the subdirs in the maildir with the unix epoch as default.
     #these are used to determine whether scanning the directory for new mail
     #is a worthwhile effort
-    @mtimes = { 'cur' => Time.at(0), 'new' => Time.at(0) }.merge(mtimes)
+    @mtimes = { 'cur' => Time.at(0), 'new' => Time.at(0) }.merge(mtimes || {})
     @dir_ids = { 'cur' => [], 'new' => [] }
   end