Fix some minor plugin errors on exit (#3739)

This commit is contained in:
poire-z
2018-03-11 15:05:30 +01:00
committed by Frans de Jonge
parent c93bbec40d
commit c5b547f6b3
2 changed files with 2 additions and 2 deletions

View File

@@ -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.")

View File

@@ -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.")