[sup-talk] Minor maildir change
Magnus Therning
magnus at therning.org
Sun Sep 9 18:40:34 EDT 2007
I thought it was a little strange the file_path on Maildir objects
returned `nil` so I changed that to return the path of the maildir.
I am somewhat puzzled by the labels one receives from Maildir::each,
it's the default labels for the source rather than the labels of the
actual message. Especially confusing was the choice to label something
'unread' if it's filename doesn't contains an 'R'. IIRC 'R' means that
the email has been replied to, it would have been more correct to mark
it unread if it doesn't contain an 'S' (as in seen). However, it seems
silly to take any of this into consideration when sup doesn't deal with
maildirs "properly" anyway. I've removed that strangeness, at least
until a full maildir implementation makes it into sup.
/M
=== modified file 'lib/sup/maildir.rb'
--- lib/sup/maildir.rb 2007-09-09 22:27:27 +0000
+++ lib/sup/maildir.rb 2007-09-09 22:29:52 +0000
@@ -27,6 +27,7 @@
@mutex = Mutex.new
end
+ def file_path; @dir end
def self.suggest_labels_for path; [] end
def check
@@ -93,7 +94,7 @@
start.upto(@ids.length - 1) do |i|
id = @ids[i]
self.cur_offset = id
- yield id, @labels + (@ids_to_fns[id] =~ /,.*R.*$/ ? [] : [:unread])
+ yield id, @labels
end
end
--
Magnus Therning (OpenPGP: 0xAB4DFBA4)
magnus@therning.org Jabber: magnus.therning@gmail.com
http://therning.org/magnus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://rubyforge.org/pipermail/sup-talk/attachments/20070909/3ea679f1/attachment-0001.bin
More information about the sup-talk
mailing list