From 58b92765ce8d2d0233840197e2ff777adb06b642 Mon Sep 17 00:00:00 2001 From: Oleg Shparber Date: Sat, 8 Feb 2020 22:24:17 -0500 Subject: [PATCH] fix(registry): fix regression in the index file detection --- src/libs/registry/docset.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libs/registry/docset.cpp b/src/libs/registry/docset.cpp index 2218c2000..ff469b4db 100644 --- a/src/libs/registry/docset.cpp +++ b/src/libs/registry/docset.cpp @@ -174,6 +174,7 @@ Docset::Docset(QString path) m_keywords.removeDuplicates(); // Determine index page. This is ridiculous. + const QString mdIndexFilePath = m_indexFilePath; // Save path from the metadata. // Prefer index path provided by the docset. if (plist.contains(InfoPlist::DashIndexFilePath)) { @@ -184,9 +185,8 @@ Docset::Docset(QString path) } // Check the metadata. - if (m_indexFilePath.isEmpty() && !dir.exists(m_indexFilePath)) { - // Well, metadata was wrong. - m_indexFileUrl.clear(); + if (m_indexFilePath.isEmpty() && !mdIndexFilePath.isEmpty() && dir.exists(mdIndexFilePath)) { + m_indexFilePath = mdIndexFilePath; } // What if there is index.html.