]> git.notmuchmail.org Git - sup/commitdiff
handle url-escaped imap folder names
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Sat, 27 Oct 2007 00:23:57 +0000 (00:23 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Sat, 27 Oct 2007 00:23:57 +0000 (00:23 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@613 5c8cc53c-5e98-4d25-b20a-d8db53a31250

doc/TODO
lib/sup/imap.rb

index 8f351aaf0c2be0ffa90b3bf99f3c2e61fce93d0a..1fa1f92bd038b40f1ae5c93af73bf76b73ea7a8f 100644 (file)
--- 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
index 6f4b7c01ceaec8199ce4a6963863a2ecf39afae2..8e5bd44a34468b186c7de261ef0f62af985d3fe1 100644 (file)
@@ -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