forked from qt-creator/qt-creator
Docker: Warn if file access through merged dir is impossible
Even when the fallbacks via 'docker exec' work this will cause a significant performance hit. Better inform the user. Change-Id: If369dcc498bffa2ef422dab3e69325c4122b45ad Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -510,11 +510,19 @@ void DockerDevicePrivate::tryCreateLocalFileAccess()
|
||||
//LOG(proc2.commandLine().toUserOutput());
|
||||
proc.start();
|
||||
proc.waitForFinished();
|
||||
const QByteArray out = proc.readAllStandardOutput();
|
||||
m_mergedDir = QString::fromUtf8(out).trimmed();
|
||||
const QString out = proc.stdOut();
|
||||
m_mergedDir = out.trimmed();
|
||||
if (m_mergedDir.endsWith('/'))
|
||||
m_mergedDir.chop(1);
|
||||
|
||||
if (!QFileInfo(m_mergedDir).isWritable()) {
|
||||
MessageManager::writeFlashing(
|
||||
tr("Local write access to Docker container %1 unavailable through directory \"%2\".")
|
||||
.arg(m_container, m_mergedDir)
|
||||
+ '\n' + tr("Output: %1").arg(out)
|
||||
+ '\n' + tr("Error: %1").arg(proc.stdErr()));
|
||||
}
|
||||
|
||||
m_mergedDirWatcher.addPath(m_mergedDir);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user