]> git.cworth.org Git - sup/commitdiff
fixing maildir bugs
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Thu, 22 Feb 2007 00:45:14 +0000 (00:45 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Thu, 22 Feb 2007 00:45:14 +0000 (00:45 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@341 5c8cc53c-5e98-4d25-b20a-d8db53a31250

lib/sup/maildir.rb

index e817eee589435eb89200e63ea429a936e1ba1ba3..a76ec60e9b52b3147166585bf16aed5621c26cc4 100644 (file)
@@ -51,7 +51,7 @@ class Maildir < Source
     return if @last_scan && (Time.now - @last_scan) < SCAN_INTERVAL
 
     cdir = File.join(@dir, 'cur')
-    ndir = File.join(@dir, 'cur')
+    ndir = File.join(@dir, 'new')
 
     begin
       @ids, @ids_to_fns = @mutex.synchronize do
@@ -105,7 +105,7 @@ private
   
   def make_id fn
     # use 7 digits for the size. why 7? seems nice.
-    sprintf("%d%07d", File.ctime(fn), File.size(fn)).to_i
+    sprintf("%d%07d", File.mtime(fn), File.size(fn)).to_i
   end
 
   def with_file_for id