Commit e18b38ee authored by Christoph Cullmann's avatar Christoph Cullmann 🐮
Browse files

quick filter for stale projects

parent 5c76e470
Pipeline #186927 passed with stage
in 5 minutes and 40 seconds
......@@ -658,13 +658,13 @@ void KateProjectPlugin::readSessionConfig(const KConfigGroup &config)
const QVariantMap sMap = QJsonDocument::fromJson(project.toUtf8()).toVariant().toMap();
// valid file backed project?
if (const auto file = sMap[QStringLiteral("file")].toString(); !file.isEmpty()) {
if (const auto file = sMap[QStringLiteral("file")].toString(); !file.isEmpty() && QFileInfo(file).exists()) {
createProjectForFileName(file);
continue;
}
// valid path + data project?
if (const auto path = sMap[QStringLiteral("path")].toString(); !path.isEmpty()) {
if (const auto path = sMap[QStringLiteral("path")].toString(); !path.isEmpty() && QFileInfo(path).exists()) {
createProjectForDirectory(QDir(path), sMap[QStringLiteral("data")].toMap());
continue;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment