diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-08-04 21:43:02 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-08-04 21:43:02 +0900 |
| commit | 3879da592d689d551778b710c21c8a95d2874ab3 (patch) | |
| tree | 121df06eeb860738ff2c5b6abd3c89fb8b09db7b /src/FtpNegotiationCommand.cc | |
| parent | 45686860e1b5e94bfa8fa95603f101cce53ed4b1 (diff) | |
In MinGW32, open file with UNICODE filename and print them in ANSI.
Diffstat (limited to 'src/FtpNegotiationCommand.cc')
| -rw-r--r-- | src/FtpNegotiationCommand.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/FtpNegotiationCommand.cc b/src/FtpNegotiationCommand.cc index 96c09476..8d25b6e6 100644 --- a/src/FtpNegotiationCommand.cc +++ b/src/FtpNegotiationCommand.cc @@ -376,7 +376,7 @@ bool FtpNegotiationCommand::onFileSizeDetermined(uint64_t totalLength) isSameFileBeingDownloaded(getRequestGroup())) { throw DOWNLOAD_FAILURE_EXCEPTION2 (fmt(EX_DUPLICATE_FILE_DOWNLOAD, - getRequestGroup()->getFirstFilePath().c_str()), + utf8ToNative(getRequestGroup()->getFirstFilePath()).c_str()), error_code::DUPLICATE_DOWNLOAD); } if(totalLength == 0) { @@ -404,9 +404,10 @@ bool FtpNegotiationCommand::onFileSizeDetermined(uint64_t totalLength) getPieceStorage()->markAllPiecesDone(); getDownloadContext()->setChecksumVerified(true); sequence_ = SEQ_DOWNLOAD_ALREADY_COMPLETED; - A2_LOG_NOTICE(fmt(MSG_DOWNLOAD_ALREADY_COMPLETED, - util::itos(getRequestGroup()->getGID()).c_str(), - getRequestGroup()->getFirstFilePath().c_str())); + A2_LOG_NOTICE + (fmt(MSG_DOWNLOAD_ALREADY_COMPLETED, + util::itos(getRequestGroup()->getGID()).c_str(), + utf8ToNative(getRequestGroup()->getFirstFilePath()).c_str())); poolConnection(); return false; |
