From 27823032537130726842b8858e532e4a878202b8 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 25 Apr 2019 17:57:37 +0200 Subject: [PATCH] SSH: Shorten the temporary directory even more Creating a sub-directory of Creator's master temp dir makes the socket path too long on macOS, so use a normal QTemporaryDir. Fixes: QTCREATORBUG-21748 Change-Id: I4992e43032838e6f625162cd40ae101d21c62fdc Reviewed-by: hjk Reviewed-by: Eike Ziller --- src/libs/ssh/sshconnection.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/libs/ssh/sshconnection.cpp b/src/libs/ssh/sshconnection.cpp index fe207235ecd..703d20932ca 100644 --- a/src/libs/ssh/sshconnection.cpp +++ b/src/libs/ssh/sshconnection.cpp @@ -36,7 +36,6 @@ #include #include #include -#include #include #include @@ -149,7 +148,7 @@ struct SshConnection::SshConnectionPrivate SshConnectionInfo connInfo; SshProcess masterProcess; QString errorString; - std::unique_ptr masterSocketDir; + std::unique_ptr masterSocketDir; State state = Unconnected; const bool sharingEnabled = SshSettings::connectionSharingEnabled(); }; @@ -351,8 +350,7 @@ void SshConnection::doConnectToHost() } if (!d->sharingEnabled) emitConnected(); - QTC_ASSERT(TemporaryDirectory::masterTemporaryDirectory(), return); - d->masterSocketDir.reset(new TemporaryDirectory("ssh-XXXXXX")); + d->masterSocketDir.reset(new QTemporaryDir); if (!d->masterSocketDir->isValid()) { emitError(tr("Cannot establish SSH connection: Failed to create temporary " "directory for control socket: %1")