Commit a5949470 authored by Ahmad Samir's avatar Ahmad Samir Committed by Christoph Cullmann
Browse files

Konsole plugin: quote args before passing them to the shell

An alternative fix for 456570

CCBUG: 456570
parent e4e3d53c
......@@ -420,14 +420,11 @@ void KateConsole::slotRun()
}
// then filename
QFileInfo file_path(u.path());
if (cg.readEntry("RemoveExtension", true)) {
// append filename without extension (i.e. keep only the basename)
output_str += QStringLiteral("\"") + file_path.absoluteFilePath().remove(file_path.suffix()) + QStringLiteral("\"");
} else {
// append filename to the terminal
output_str += QStringLiteral("\"") + file_path.absoluteFilePath() + QStringLiteral("\"");
}
QFileInfo fileInfo(u.path());
const bool removeExt = cg.readEntry("RemoveExtension", true);
// append filename without extension (i.e. keep only the basename)
const QString path = fileInfo.absolutePath() + QLatin1Char('/') + (removeExt ? fileInfo.baseName() : fileInfo.fileName());
output_str += KShell::quoteArg(path);
const QString msg = i18n(
"Do you really want to Run the document ?\n"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment