[fix] DocumentRegistry: don't create empty sdr and add hasProvider() (#3675)

As suggested by @poire-z https://github.com/koreader/koreader/pull/3653#issuecomment-364663156
This commit is contained in:
Frans de Jonge
2018-02-10 18:36:18 +01:00
committed by GitHub
parent 229c492979
commit ced9e45d92
7 changed files with 37 additions and 21 deletions

View File

@@ -38,7 +38,7 @@ function FtpApi:listFolder(address_path,folder_path)
type = type,
})
--show only file with supported formats
elseif extension and DocumentRegistry:getProvider(item) then
elseif extension and DocumentRegistry:hasProvider(item) then
type = "file"
table.insert(ftp_file, {
text = file_name,