From 7b3c2c13a1aa6b66f5d383804b556a66ca857950 Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Tue, 6 Jun 2023 07:59:09 +0200 Subject: [PATCH] Terminal: Decode percent encoding Fixes: QTCREATORBUG-29254 Change-Id: I0d1712753f488dff9252d2fcf099c9aefb06ed0b Reviewed-by: Christian Stenger --- src/plugins/terminal/shellintegration.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/terminal/shellintegration.cpp b/src/plugins/terminal/shellintegration.cpp index d8e26f94ce5..d981dc7269e 100644 --- a/src/plugins/terminal/shellintegration.cpp +++ b/src/plugins/terminal/shellintegration.cpp @@ -85,7 +85,8 @@ void ShellIntegration::onOsc(int cmd, const VTermStringFragment &fragment) emit currentDirChanged(FilePath::fromUserInput(value.toString()).path()); } else if (cmd == 7) { - emit currentDirChanged(FilePath::fromUserInput(d).path()); + const QString decoded = QUrl::fromPercentEncoding(d.toUtf8()); + emit currentDirChanged(FilePath::fromUserInput(decoded).path()); } else if (cmd == 133) { qCDebug(integrationLog) << "OSC 133:" << data; } else if (cmd == 633 && command.length() == 1) {