SSH: Do not use sftp -b

The -b option turns on "pure batch mode", i.e. users won't get asked for
a password. This does not seem to be overridable. Therefore, we use
input file redirection instead.

Fixes: QTCREATORBUG-24979
Change-Id: Id1f703ffd61a7b8d194437ee89676770990d0efa
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
Christian Kandeler
2020-11-30 14:42:33 +01:00
parent 990aa5e45b
commit 2c2c7255b9

View File

@@ -180,9 +180,8 @@ void SftpTransfer::doStart()
+ QtcProcess::quoteArgUnix(sourceFileOrLinkTarget).toLocal8Bit() + ' '
+ QtcProcess::quoteArgUnix(f.targetFile).toLocal8Bit() + '\n');
}
d->sftpProc.start(sftpBinary.toString(),
QStringList{"-b", QDir::toNativeSeparators(batchFile.fileName())}
<< d->connectionArgs);
d->sftpProc.setStandardInputFile(batchFile.fileName());
d->sftpProc.start(sftpBinary.toString(), d->connectionArgs);
emit started();
}