Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Konsole
Commits
402412fd
Commit
402412fd
authored
Jun 21, 2007
by
Dirk Mueller
Browse files
fix shell quoting
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=678405
parent
343becbf
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/SessionController.cpp
View file @
402412fd
...
...
@@ -262,9 +262,7 @@ void SessionController::openUrl( const KUrl& url )
if
(
url
.
isLocalFile
()
)
{
QString
path
=
url
.
toLocalFile
();
KShell
::
quoteArg
(
path
);
_session
->
emulation
()
->
sendText
(
"cd "
+
path
+
'\r'
);
_session
->
emulation
()
->
sendText
(
"cd "
+
KShell
::
quoteArg
(
path
)
+
'\r'
);
}
else
if
(
url
.
protocol
()
==
"ssh"
)
{
...
...
src/TerminalDisplay.cpp
View file @
402412fd
...
...
@@ -2665,7 +2665,7 @@ void TerminalDisplay::dropEvent(QDropEvent* event)
_lnAction
->
setEnabled
(
false
);
}
if
(
urllist
.
count
()
>
1
)
KShell
::
quoteArg
(
tmp
);
tmp
=
KShell
::
quoteArg
(
tmp
);
_dropText
+=
tmp
;
}
...
...
@@ -2696,7 +2696,7 @@ void TerminalDisplay::drop_menu_activated(QAction* action)
{
case
paste
:
if
(
_dndFileCount
==
1
)
KShell
::
quoteArg
(
_dropText
);
_dropText
=
KShell
::
quoteArg
(
_dropText
);
emit
sendStringToEmu
(
_dropText
.
toLocal8Bit
());
activateWindow
();
break
;
...
...
@@ -2712,7 +2712,7 @@ void TerminalDisplay::drop_menu_activated(QAction* action)
_dropText
=
url
.
directory
(
KUrl
::
ObeyTrailingSlash
);
// remove filename
}
}
KShell
::
quoteArg
(
_dropText
);
_dropText
=
KShell
::
quoteArg
(
_dropText
);
emit
sendStringToEmu
(
_dropText
.
toLocal8Bit
());
emit
sendStringToEmu
(
"
\n
"
);
activateWindow
();
...
...
@@ -2729,7 +2729,7 @@ void TerminalDisplay::drop_menu_activated(QAction* action)
}
if
(
item
>
cd
&&
item
<=
mv
)
{
if
(
_dndFileCount
==
1
)
KShell
::
quoteArg
(
_dropText
);
_dropText
=
KShell
::
quoteArg
(
_dropText
);
emit
sendStringToEmu
(
_dropText
.
toLocal8Bit
());
emit
sendStringToEmu
(
" .
\n
"
);
activateWindow
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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