Skip to content

Commit

Permalink
fix(registry): fix regression in the index file detection
Browse files Browse the repository at this point in the history
  • Loading branch information
trollixx committed Feb 9, 2020
1 parent cbd0d19 commit 58b9276
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/libs/registry/docset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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.
Expand Down

0 comments on commit 58b9276

Please sign in to comment.