diff --git a/src/BookmarkHandler.cpp b/src/BookmarkHandler.cpp --- a/src/BookmarkHandler.cpp +++ b/src/BookmarkHandler.cpp @@ -124,7 +124,9 @@ QString path = url.path(); path = KShell::tildeExpand(path); - path = QFileInfo(path).baseName(); + // use completeBaseName() to handle files with more than one dot + // in the name + path = QFileInfo(path).completeBaseName(); return path; } else if (!url.host().isEmpty()) { diff --git a/src/ColorSchemeManager.cpp b/src/ColorSchemeManager.cpp --- a/src/ColorSchemeManager.cpp +++ b/src/ColorSchemeManager.cpp @@ -93,7 +93,11 @@ KConfig config(filePath, KConfig::NoGlobals); auto scheme = new ColorScheme(); - scheme->setName(info.baseName()); + // use completeBaseName() to handle files with more than one dot in + // the name (e.g. a.b.colorscheme), this prevents an infinte loop + // when findColorScheme() calls this function + // fixes konsole BUG: 343071 + scheme->setName(info.completeBaseName()); scheme->read(config); if (scheme->name().isEmpty()) { @@ -103,7 +107,8 @@ return false; } - if (!_colorSchemes.contains(info.baseName())) { + // completeBaseName(): see above + if (!_colorSchemes.contains(info.completeBaseName())) { _colorSchemes.insert(scheme->name(), scheme); } else { //qDebug() << "color scheme with name" << scheme->name() << "has already been" << diff --git a/src/KeyboardTranslatorManager.cpp b/src/KeyboardTranslatorManager.cpp --- a/src/KeyboardTranslatorManager.cpp +++ b/src/KeyboardTranslatorManager.cpp @@ -99,8 +99,10 @@ // add the name of each translator to the list and associated // the name with a null pointer to indicate that the translator // has not yet been loaded from disk + // use completeBaseName() to handle files with more than one dot in + // the name (e.g. a.b.keytab) foreach (const QString &translatorPath, list) { - QString name = QFileInfo(translatorPath).baseName(); + QString name = QFileInfo(translatorPath).completeBaseName(); if (!_translators.contains(name)) { _translators.insert(name, nullptr);