Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Kate
Commits
8e45d772
Commit
8e45d772
authored
Jul 21, 2022
by
Ahmad Samir
Browse files
Konsole plugin: quote args before passing them to the shell
An alternative fix for 456570
CCBUG: 456570
parent
037c7d72
Changes
1
Hide whitespace changes
Inline
Side-by-side
addons/konsole/kateconsole.cpp
View file @
8e45d772
...
...
@@ -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
"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment