forked from qt-creator/qt-creator
RemoteLinux: Allow transferring directories
Fixes: QTCREATORBUG-31136 Change-Id: Ic9e5d57ba5f5e85efe5db58719f38f0702ac3492 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -1337,7 +1337,7 @@ static FilePaths dirsToCreate(const FilesToTransfer &files)
|
|||||||
|
|
||||||
static QByteArray transferCommand(bool link)
|
static QByteArray transferCommand(bool link)
|
||||||
{
|
{
|
||||||
return link ? "ln -s" : "put";
|
return link ? "ln -s" : "put -R";
|
||||||
}
|
}
|
||||||
|
|
||||||
class SshTransferInterface : public FileTransferInterface
|
class SshTransferInterface : public FileTransferInterface
|
||||||
@@ -1558,7 +1558,7 @@ private:
|
|||||||
const auto batchIt = m_batches.begin();
|
const auto batchIt = m_batches.begin();
|
||||||
for (auto filesIt = batchIt->cbegin(); filesIt != batchIt->cend(); ++filesIt) {
|
for (auto filesIt = batchIt->cbegin(); filesIt != batchIt->cend(); ++filesIt) {
|
||||||
const FileToTransfer fixedFile = fixLocalFileOnWindows(*filesIt, options);
|
const FileToTransfer fixedFile = fixLocalFileOnWindows(*filesIt, options);
|
||||||
options << fixedLocalPath(fixedFile.m_source);
|
options << fixedFile.m_source.path();
|
||||||
}
|
}
|
||||||
options << fixedRemotePath(batchIt.key(), userAtHost());
|
options << fixedRemotePath(batchIt.key(), userAtHost());
|
||||||
m_batches.erase(batchIt);
|
m_batches.erase(batchIt);
|
||||||
@@ -1588,11 +1588,6 @@ private:
|
|||||||
return fixedFile;
|
return fixedFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString fixedLocalPath(const FilePath &file) const
|
|
||||||
{
|
|
||||||
return file.isDir() && file.path().back() != '/' ? file.path() + '/' : file.path();
|
|
||||||
}
|
|
||||||
|
|
||||||
QString fixedRemotePath(const FilePath &file, const QString &remoteHost) const
|
QString fixedRemotePath(const FilePath &file, const QString &remoteHost) const
|
||||||
{
|
{
|
||||||
return remoteHost + ':' + file.path();
|
return remoteHost + ':' + file.path();
|
||||||
|
Reference in New Issue
Block a user