manage folders with non-latin1 names
This commit is contained in:
parent
0d20ce14b8
commit
5264cf12ab
|
@ -1,3 +1,4 @@
|
||||||
|
require 'ezcrypto'
|
||||||
class FoldersController < ApplicationController
|
class FoldersController < ApplicationController
|
||||||
include ImapUtils
|
include ImapUtils
|
||||||
|
|
||||||
|
|
|
@ -156,16 +156,16 @@ class IMAPMailbox
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_folder(name)
|
def create_folder(name)
|
||||||
begin
|
# begin
|
||||||
@imap.create(name)
|
@imap.create(Net::IMAP.encode_utf7(name))
|
||||||
reload
|
reload
|
||||||
rescue Exception=>e
|
# rescue Exception=>e
|
||||||
end
|
# end
|
||||||
end
|
end
|
||||||
|
|
||||||
def delete_folder(name)
|
def delete_folder(name)
|
||||||
begin
|
begin
|
||||||
@imap.delete(name)
|
@imap.delete(folders[name].utf7_name)
|
||||||
reload
|
reload
|
||||||
rescue Exception=>e
|
rescue Exception=>e
|
||||||
logger.error("Exception on delete #{name} folder #{e}")
|
logger.error("Exception on delete #{name} folder #{e}")
|
||||||
|
|
Loading…
Reference in a new issue