| 189 | } |
| 190 | |
| 191 | CBackendFileTransfer::OnInitReturnValue CBackendFileTransfer::InitSFTP() |
| 192 | { |
| 193 | CParameterSSH* ssh = &m_pOperate->GetParameter()->m_SSH; |
| 194 | #if HAVE_LIBSSH |
| 195 | m_pSFTP = new CChannelSFTP(this, ssh); |
| 196 | if(!m_pSFTP) { |
| 197 | return OnInitReturnValue::Fail; |
| 198 | } |
| 199 | bool bRet = m_pSFTP->open(QIODevice::ReadWrite); |
| 200 | if(!bRet) { |
| 201 | QString szErr; |
| 202 | szErr = tr("Open SFTP fail.") + m_pSFTP->errorString(); |
| 203 | qCritical(log) << szErr; |
| 204 | emit sigShowMessageBox(tr("Error"), szErr, QMessageBox::Critical); |
| 205 | return OnInitReturnValue::Fail; |
| 206 | } |
| 207 | #endif |
| 208 | emit sigRunning(); |
| 209 | return OnInitReturnValue::UseOnProcess; |
| 210 | } |
| 211 | |
| 212 | void CBackendFileTransfer::slotMakeDir(const QString &szDir) |
| 213 | { |
nothing calls this directly
no test coverage detected