From 636400a949dcd1435c5bdc5cc2ca896df9c5309e Mon Sep 17 00:00:00 2001 From: David Faure Date: Mon, 9 Oct 2000 11:49:06 +0000 Subject: [PATCH] Allow to follow a file, by cd'ing to its directory. Patch discussed on kfm-devel. svn path=/trunk/kdebase/konsole/; revision=66926 --- src/konsole_part.C | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/konsole_part.C b/src/konsole_part.C index 8feecdc4..7442425d 100644 --- a/src/konsole_part.C +++ b/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);