Allow to follow a file, by cd'ing to its directory.

Patch discussed on kfm-devel.

svn path=/trunk/kdebase/konsole/; revision=66926
wilder-portage
David Faure 26 years ago
parent 94d6704e44
commit 636400a949
  1. 7
      src/konsole_part.C

@ -199,12 +199,7 @@ bool konsolePart::openURL( const KURL & url )
{
struct stat buff;
stat( QFile::encodeName( url.path() ), &buff );
if ( !S_ISDIR( buff.st_mode ) )
{
emit canceled( QString::null );
return false;
}
QString text = url.path();
QString text = ( S_ISDIR( buff.st_mode ) ? url.path() : url.directory() );
text.replace(QRegExp(" "), "\\ "); // escape spaces
text = QString::fromLatin1("cd ") + text + '\n';
QKeyEvent e(QEvent::KeyPress, 0,-1,0, text);

Loading…
Cancel
Save