[chore] Remove uneeded doc_settings:close() (#5504)

When just reading settings, no need to close and
write the file to disk.
This commit is contained in:
poire-z
2019-10-18 17:23:15 +02:00
committed by Frans de Jonge
parent 17244cca2f
commit 7caa21a3fb
2 changed files with 0 additions and 4 deletions

View File

@@ -69,7 +69,6 @@ function PdfDocument:convertKoptToReflowableFontSize(font_size)
if DocSettings:hasSidecarFile(self.file) then
local doc_settings = DocSettings:open(self.file)
size = doc_settings:readSetting("kopt_font_size")
doc_settings:close()
end
if size then
return size * default_font_size

View File

@@ -176,7 +176,6 @@ function Screensaver:excluded()
if DocSettings:hasSidecarFile(lastfile) then
local doc_settings = DocSettings:open(lastfile)
exclude_ss = doc_settings:readSetting("exclude_screensaver")
doc_settings:close()
end
return exclude_ss or false
end
@@ -260,7 +259,6 @@ function Screensaver:show(event, fallback_message)
if DocSettings:hasSidecarFile(lastfile) then
local doc_settings = DocSettings:open(lastfile)
exclude = doc_settings:readSetting("exclude_screensaver")
doc_settings:close()
end
if exclude ~= true then
if lfs.attributes(lastfile, "mode") == "file" then
@@ -306,7 +304,6 @@ function Screensaver:show(event, fallback_message)
screensaver_type = "message"
end
doc:close()
doc_settings:close()
else
screensaver_type = "message"
end