diff -Nur source.orig/SftpControlSocket.cpp source.patch/SftpControlSocket.cpp
old
|
new
|
|
326 | 326 | if (m_Operation.nOpState==LIST_PWD) |
327 | 327 | { //Reply to PWD command |
328 | 328 | pData->realpath.SetServer(m_CurrentServer); |
329 | | if (m_Reply=="" || !pData->realpath.SetPath(m_Reply)) |
| 329 | if (m_Reply=="" || !pData->realpath.SetPath(A2CT(m_Reply))) |
330 | 330 | { |
331 | 331 | LogMessage(__FILE__, __LINE__, this,FZ_LOG_WARNING, _T("Can't parse path") ); |
332 | 332 | ResetOperation(FZ_REPLY_ERROR); |
… |
… |
|
363 | 363 | else if (m_Operation.nOpState==LIST_CWD) |
364 | 364 | { |
365 | 365 | pData->realpath.SetServer(m_CurrentServer); |
366 | | if (m_Reply=="" || !pData->realpath.SetPath(m_Reply)) |
| 366 | if (m_Reply=="" || !pData->realpath.SetPath(A2CT(m_Reply))) |
367 | 367 | { |
368 | 368 | LogMessage(__FILE__, __LINE__, this,FZ_LOG_WARNING, _T("Can't parse path") ); |
369 | 369 | ResetOperation(FZ_REPLY_ERROR); |
… |
… |
|
410 | 410 | else if (m_Operation.nOpState==LIST_CWD2) |
411 | 411 | { |
412 | 412 | pData->realpath.SetServer(m_CurrentServer); |
413 | | if (m_Reply=="" || !pData->realpath.SetPath(m_Reply)) |
| 413 | if (m_Reply=="" || !pData->realpath.SetPath(A2CT(m_Reply))) |
414 | 414 | { |
415 | 415 | LogMessage(__FILE__, __LINE__, this,FZ_LOG_WARNING, _T("Can't parse path") ); |
416 | 416 | ResetOperation(FZ_REPLY_ERROR); |
… |
… |
|
455 | 455 | if (m_Reply!="") |
456 | 456 | { |
457 | 457 | char *data = new char[m_Reply.GetLength()+2+1]; |
458 | | strcpy(data, T2CA(m_Reply+"\r\n")); |
| 458 | strcpy(data, m_Reply+"\r\n"); |
459 | 459 | pData->pParser->AddData(data, m_Reply.GetLength()+2); |
460 | 460 | } |
461 | 461 | else |
… |
… |
|
821 | 821 | { |
822 | 822 | CServerPath path; |
823 | 823 | path.SetServer(m_CurrentServer); |
824 | | if (!path.SetPath(m_Reply)) |
| 824 | if (!path.SetPath(A2CT(m_Reply))) |
825 | 825 | { |
826 | 826 | LogMessage(__FILE__, __LINE__, this,FZ_LOG_WARNING, _T("Can't parse path")); |
827 | 827 | nReplyError=FZ_REPLY_ERROR; |
… |
… |
|
1046 | 1046 | { |
1047 | 1047 | CServerPath path; |
1048 | 1048 | path.SetServer(m_CurrentServer); |
1049 | | if (!path.SetPath(m_Reply)) |
| 1049 | if (!path.SetPath(A2CT(m_Reply))) |
1050 | 1050 | { |
1051 | 1051 | LogMessage(__FILE__, __LINE__, this,FZ_LOG_WARNING, _T("Can't parse path")); |
1052 | 1052 | nReplyError=FZ_REPLY_ERROR; |
… |
… |
|
1137 | 1137 | if (m_Reply != "") |
1138 | 1138 | { |
1139 | 1139 | char *data=new char[m_Reply.GetLength()+2+1]; |
1140 | | strcpy(data, T2CA(m_Reply+"\r\n")); |
| 1140 | strcpy(data, m_Reply+"\r\n"); |
1141 | 1141 | pData->pParser->AddData(data, m_Reply.GetLength()+2); |
1142 | 1142 | return; |
1143 | 1143 | } |
… |
… |
|
1336 | 1336 | filename = pData->transferfile.remotefile; |
1337 | 1337 | else |
1338 | 1338 | filename = pData->transferfile.remotepath.GetPath() + pData->transferfile.remotefile; |
1339 | | int nLen1=filename.GetLength() + 1; |
1340 | | int nLen2=pData->transferfile.localfile.GetLength()+1; |
| 1339 | int nLen1=strlen(T2CA(filename)) + 1; |
| 1340 | int nLen2=strlen(T2CA(pData->transferfile.localfile))+1; |
1341 | 1341 | char *pCmd=new char[nLen1+nLen2+4]; |
1342 | 1342 | strcpy(pCmd, T2CA(filename)); |
1343 | 1343 | strcpy(pCmd+nLen1, T2CA(pData->transferfile.localfile)); |
… |
… |
|
2330 | 2330 | |
2331 | 2331 | str.Format(IDS_STATUSMSG_CONNECTEDWITHSFTP, m_ServerName); |
2332 | 2332 | ShowStatus(str,0); |
2333 | | char *data=new char[m_CurrentServer.host.GetLength() + m_CurrentServer.user.GetLength() + m_CurrentServer.pass.GetLength() + 4 + 3 + 2]; |
| 2333 | char *data=new char[strlen(T2CA(m_CurrentServer.host + m_CurrentServer.user + m_CurrentServer.pass)) + 4 + 3 + 2]; |
2334 | 2334 | char *p=data; |
2335 | 2335 | strcpy(p, T2CA(m_CurrentServer.host)); |
2336 | 2336 | p+=strlen(p)+1; |
… |
… |
|
2922 | 2922 | m_Operation.nOpMode=CSMODE_CHMOD; |
2923 | 2923 | CString str; |
2924 | 2924 | str.Format( _T("%d %s%s"), nValue, path.GetPath(), filename); |
2925 | | int nLen=str.GetLength()+1; |
| 2925 | int nLen=strlen(T2CA(str))+1; |
2926 | 2926 | char *pData=new char[nLen]; |
2927 | 2927 | strcpy(pData, T2CA(str)); |
2928 | 2928 | int pos(str.Find( _T(" ") )); |
diff -Nur source.orig/SftpControlSocket.h source.patch/SftpControlSocket.h
old
|
new
|
|
75 | 75 | int CheckOverwriteFile(); |
76 | 76 | |
77 | 77 | BOOL m_bQuit; |
78 | | CString m_Reply; |
| 78 | CStringA m_Reply; |
79 | 79 | BOOL m_bCheckForTimeout; |
80 | 80 | virtual void DoClose(int nError = 0); |
81 | 81 | void ResetOperation(int nSuccessful = -1); |