|
|
|
@ -59,6 +59,9 @@ function BookInfo:show(file, book_props)
|
|
|
|
|
-- book_props may be provided if caller already has them available
|
|
|
|
|
-- but it may lack 'pages', that we may get from sidecar file
|
|
|
|
|
if not book_props or not book_props.pages then
|
|
|
|
|
-- check there is actually a sidecar file before calling DocSettings:open()
|
|
|
|
|
-- that would create an empty sidecar directory
|
|
|
|
|
if DocSettings:hasSidecarFile(file) then
|
|
|
|
|
local doc_settings = DocSettings:open(file)
|
|
|
|
|
if doc_settings then
|
|
|
|
|
if not book_props then
|
|
|
|
@ -85,6 +88,7 @@ function BookInfo:show(file, book_props)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
-- If still no book_props (book never opened or empty 'stats'), open the
|
|
|
|
|
-- document to get them
|
|
|
|
|