Ticket #1507: filezilla3_beta2_sftp_transfer_dir.patch

File filezilla3_beta2_sftp_transfer_dir.patch, 1006 bytes (added by tommywu, 18 years ago)

fix FZ3 sftp upload/download directory

  • engine/sftpcontrolsocket.cpp

    diff -Nur src.utf8/engine/sftpcontrolsocket.cpp src/engine/sftpcontrolsocket.cpp
    old new  
    995995
    996996int CSftpControlSocket::ChangeDirParseResponse(bool successful, const wxString& reply)
    997997{
    998     if (!successful || !m_pCurOpData)
     998    if (!m_pCurOpData)
    999999    {
    10001000        ResetOperation(FZ_REPLY_ERROR);
    10011001        return FZ_REPLY_ERROR;
    10021002    }
    10031003    CSftpChangeDirOpData *pData = static_cast<CSftpChangeDirOpData *>(m_pCurOpData);
     1004    if (!successful && pData->opState != cwd_cwd)
     1005    {
     1006        ResetOperation(FZ_REPLY_ERROR);
     1007        return FZ_REPLY_ERROR;
     1008    }
    10041009
    10051010    bool error = false;
    10061011    switch (pData->opState)
     
    11981203    if (download)
    11991204    {
    12001205        wxString filename = remotePath.FormatFilename(remoteFile);
     1206        // Create local directory
     1207        wxFileName fn(localFile);
     1208        wxFileName::Mkdir(fn.GetPath(), 0777, wxPATH_MKDIR_FULL);
    12011209        LogMessage(Status, _("Starting download of %s"), filename.c_str());
    12021210    }
    12031211    else