Allow profile filenames to have multiple '.'s.

After this hostname.local.profile will work with --profile and
--list-profiles.  Also, the profile path file is checked if it is a
directory.
BUG: 250399
FIXED-IN: 4.6.3
This commit is contained in:
Kurt Hindenburg
2011-04-24 00:06:02 -04:00
parent e8145abc84
commit 23062bcc0d
2 changed files with 6 additions and 2 deletions

View File

@@ -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());