diff --git a/src/Application.cpp b/src/Application.cpp index d545d59aa..3d4416f43 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -96,7 +96,7 @@ void Application::listAvailableProfiles() while ( iter.hasNext() ) { QFileInfo info(iter.next()); - std::cout << info.baseName().toLocal8Bit().data() << std::endl; + std::cout << info.completeBaseName().toLocal8Bit().data() << std::endl; } quit(); } diff --git a/src/SessionManager.cpp b/src/SessionManager.cpp index 2100db127..0db05cd08 100644 --- a/src/SessionManager.cpp +++ b/src/SessionManager.cpp @@ -132,7 +132,11 @@ Profile::Ptr SessionManager::loadProfile(const QString& shortPath) // add a suggested suffix and relative prefix if missing QFileInfo fileInfo(path); - if ( fileInfo.suffix().isEmpty() ) + + if (fileInfo.isDir()) + return Profile::Ptr(); + + if ( fileInfo.suffix() != "profile" ) path.append(".profile"); if ( fileInfo.path().isEmpty() || fileInfo.path() == "." ) path.prepend(QString("konsole")+QDir::separator());