fix(registry): save non-zero docset revision in meta.json

Regression introduced in a fix for #1532.

Fixes #1559.
This commit is contained in:
Oleg Shparber 2023-10-06 23:51:29 -04:00
parent f2212eb4f0
commit 2cefcd4542

View File

@ -89,8 +89,8 @@ void DocsetMetadata::save(const QString &path, const QString &version)
if (!version.isEmpty()) if (!version.isEmpty())
jsonObject[QStringLiteral("version")] = version; jsonObject[QStringLiteral("version")] = version;
if (version == latestVersion() && m_revision == 0) if (version == latestVersion() && m_revision > 0)
jsonObject[QStringLiteral("revision")] = m_revision; jsonObject[QStringLiteral("revision")] = QString::number(m_revision);
if (!m_feedUrl.isEmpty()) if (!m_feedUrl.isEmpty())
jsonObject[QStringLiteral("feed_url")] = m_feedUrl.toString(); jsonObject[QStringLiteral("feed_url")] = m_feedUrl.toString();