diff --git a/src/konsole_part.C b/src/konsole_part.C index bfd88266..52982186 100644 --- a/src/konsole_part.C +++ b/src/konsole_part.C @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -196,6 +197,13 @@ bool konsolePart::openURL( const KURL & url ) if ( url.isLocalFile() ) { + 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(); text.replace(QRegExp(" "), "\\ "); // escape spaces text = QString::fromLatin1("cd ") + text + '\n';