manage folders with non-latin1 names

This commit is contained in:
Eugene Korbut 2009-02-08 07:32:57 +10:00
parent 0d20ce14b8
commit 5264cf12ab
2 changed files with 7 additions and 6 deletions

View file

@ -1,3 +1,4 @@
require 'ezcrypto'
class FoldersController < ApplicationController
include ImapUtils

View file

@ -156,16 +156,16 @@ class IMAPMailbox
end
def create_folder(name)
begin
@imap.create(name)
reload
rescue Exception=>e
end
# begin
@imap.create(Net::IMAP.encode_utf7(name))
reload
# rescue Exception=>e
# end
end
def delete_folder(name)
begin
@imap.delete(name)
@imap.delete(folders[name].utf7_name)
reload
rescue Exception=>e
logger.error("Exception on delete #{name} folder #{e}")