From: wmorgan Date: Sat, 27 Oct 2007 00:23:57 +0000 (+0000) Subject: handle url-escaped imap folder names X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=f8a661f77007eca8965c0af28cacb3d588ec48df;p=sup handle url-escaped imap folder names git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@613 5c8cc53c-5e98-4d25-b20a-d8db53a31250 --- diff --git a/doc/TODO b/doc/TODO index 8f351aa..1fa1f92 100644 --- a/doc/TODO +++ b/doc/TODO @@ -1,3 +1,11 @@ +for 0.2 +------- + +_ bugfix: contacts.txt isn't parsed correctly when there are spaces in + aliases +_ bugfix: @ signs in names make sendmail die silently +x bugfix: need to URL-unescape maildir folders + for 0.3 ------- _ mailing list subscribe/unsubscribe @@ -6,8 +14,8 @@ _ messages as attachments _ flesh out gpg integration: sign & encrypt outgoing _ mbox: don't keep filehandles open, and protect all reads with dotlockfile _ bugfix: screwing with the headers when editing causes a crash -_ bugfix: need a better way to force an address to a particular name, - for things like evite addresses +_ need a better way to force an address to a particular name, + for things like evite addresses _ pressing A in thread-view-mode should jump to next message _ bugfix: aliases can't have spaces; check on input and handle loading parse errors gracefully diff --git a/lib/sup/imap.rb b/lib/sup/imap.rb index 6f4b7c0..8e5bd44 100644 --- a/lib/sup/imap.rb +++ b/lib/sup/imap.rb @@ -3,6 +3,7 @@ require 'net/imap' require 'stringio' require 'time' require 'rmail' +require 'cgi' ## fucking imap fucking sucks. what the FUCK kind of committee of ## dunces designed this shit. @@ -82,7 +83,7 @@ class IMAP < Source def port; @parsed_uri.port || (ssl? ? 993 : 143); end def mailbox x = @parsed_uri.path[1..-1] - x.nil? || x.empty? ? 'INBOX' : x + (x.nil? || x.empty?) ? 'INBOX' : CGI.unescape(x) end def ssl?; @parsed_uri.scheme == 'imaps' end