Fix some minor plugin errors on exit (#3739)

pull/3751/head
poire-z 6 years ago committed by Frans de Jonge
parent c93bbec40d
commit c5b547f6b3

@ -367,7 +367,7 @@ end
function NewsDownloader:onCloseDocument()
local document_full_path = self.ui.document.file
if document_full_path and news_download_dir_path == string.sub(document_full_path, 1, string.len(news_download_dir_path)) then
if document_full_path and news_download_dir_path and news_download_dir_path == string.sub(document_full_path, 1, string.len(news_download_dir_path)) then
logger.dbg("NewsDownloader: document_full_path:", document_full_path)
logger.dbg("NewsDownloader: news_download_dir_path:", news_download_dir_path)
logger.dbg("NewsDownloader: removing NewsDownloader file from history.")

@ -213,7 +213,7 @@ end
function Send2Ebook:onCloseDocument()
local document_full_path = self.ui.document.file
if document_full_path and download_dir_path == string.sub(document_full_path, 1, string.len(download_dir_path)) then
if document_full_path and download_dir_path and download_dir_path == string.sub(document_full_path, 1, string.len(download_dir_path)) then
logger.dbg("Send2Ebook: document_full_path:", document_full_path)
logger.dbg("Send2Ebook: download_dir_path:", download_dir_path)
logger.dbg("Send2Ebook: removing Send2Ebook file from history.")

Loading…
Cancel
Save