From 231ae095f6fe91bb4402196a66dc009b8aa2f433 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Mon, 12 Aug 2019 12:09:10 +0200 Subject: [PATCH] Correctly set that book's path is valid when updating it from a reader. --- src/book.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/book.cpp b/src/book.cpp index 8fae56c79..55f1505a0 100644 --- a/src/book.cpp +++ b/src/book.cpp @@ -29,7 +29,9 @@ namespace kiwix { /* Constructor */ -Book::Book() : m_readOnly(false) +Book::Book() : + m_pathValid(false), + m_readOnly(false) { } /* Destructor */ @@ -46,6 +48,7 @@ bool Book::update(const kiwix::Book& other) if (m_path.empty()) { m_path = other.m_path; + m_pathValid = other.m_pathValid; } if (m_url.empty()) { @@ -83,6 +86,7 @@ void Book::update(const kiwix::Reader& reader) m_articleCount = reader.getArticleCount(); m_mediaCount = reader.getMediaCount(); m_size = static_cast(reader.getFileSize()) << 10; + m_pathValid = true; reader.getFavicon(m_favicon, m_faviconMimeType); }