Permalink
Browse files

Fix problem with Chinese folder names not working with move/copy. Fixes

  • Loading branch information...
1 parent ee1760e commit b74d05fcfb52a99e219fdf1fe435554c124ee37e @mronge mronge committed Mar 14, 2013
Showing with 4 additions and 2 deletions.
  1. +4 −2 Source/CTCoreFolder.m
View
@@ -743,7 +743,8 @@ - (BOOL)copyMessageWithUID:(NSUInteger)uid toPath:(NSString *)path {
return NO;
}
- const char *mbPath = [path cStringUsingEncoding:NSUTF8StringEncoding];
+ char mbPath[MAX_PATH_SIZE];
+ [self getUTF7String:mbPath fromString:path];
int err = mailsession_copy_message([self folderSession], uid, mbPath);
if (err != MAIL_NO_ERROR) {
self.lastError = MailCoreCreateErrorFromIMAPCode(err);
@@ -758,7 +759,8 @@ - (BOOL)moveMessageWithUID:(NSUInteger)uid toPath:(NSString *)path {
return NO;
}
- const char *mbPath = [path cStringUsingEncoding:NSUTF8StringEncoding];
+ char mbPath[MAX_PATH_SIZE];
+ [self getUTF7String:mbPath fromString:path];
int err = mailsession_move_message([self folderSession], uid, mbPath);
if (err != MAIL_NO_ERROR) {
self.lastError = MailCoreCreateErrorFromIMAPCode(err);

0 comments on commit b74d05f

Please sign in to comment.