forked from qt-creator/qt-creator
Docker: Add a way to force file access via docker itself
Use a QTC_DOCKER_DENY_LOCAL_ACCESS environment variable. On Linux we usually try to access the container file system directly as part of the host file system. In some cases this fails, and in some cases we might want to disable it for testing purposes. Change-Id: Iebc8e7fbbc968cd6dfbc6da2d08d71dd53bfa097 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -949,6 +949,9 @@ void DockerDevicePrivate::tryCreateLocalFileAccess()
|
||||
|
||||
bool DockerDevice::hasLocalFileAccess() const
|
||||
{
|
||||
static const bool denyLocalAccess = qEnvironmentVariableIsSet("QTC_DOCKER_DENY_LOCAL_ACCESS");
|
||||
if (denyLocalAccess)
|
||||
return false;
|
||||
return !d->m_mergedDir.isEmpty();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user