From 67a92451e4ff70dcf37d71ae4a65d0c059ce1b0b Mon Sep 17 00:00:00 2001 From: Natsumi Higa Date: Wed, 31 Mar 2021 11:13:24 +0900 Subject: [PATCH] Fix IPv6 address format --- plugins/sftp/mounter.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/sftp/mounter.cpp b/plugins/sftp/mounter.cpp index 18b3b41e3..2a4841862 100644 --- a/plugins/sftp/mounter.cpp +++ b/plugins/sftp/mounter.cpp @@ -111,6 +111,10 @@ void Mounter::onPackageReceived(const NetworkPacket& np) return; } QString ip = addr.toString(); + if (addr.protocol() == QAbstractSocket::IPv6Protocol) { + ip.prepend(QLatin1Char('[')); + ip.append(QLatin1Char(']')); + } const QStringList arguments = QStringList() << QStringLiteral("%1@%2:%3").arg(