fix "empty folder" when accessing nextcloud webdav (#5171)

fix for cloud storage webdav nextcloud "empty folder" problem

See https://github.com/koreader/koreader/issues/4879
This commit is contained in:
jp8
2019-08-03 08:30:05 +02:00
committed by Frans de Jonge
parent cf7aada82b
commit 47da9600d1

View File

@@ -102,6 +102,9 @@ function WebDavApi:listFolder(address, user, pass, folder_path)
--logger.dbg("WebDav catalog item=", item)
-- <d:href> is the path and filename of the entry.
local item_fullpath = item:match("<d:href>(.*)</d:href>")
if string.sub( item_fullpath, -1 ) == "/" then
item_fullpath = string.sub( item_fullpath, 1, -2 )
end
local is_current_dir = self:isCurrentDirectory( item_fullpath, address, path )
local item_name = util.urlDecode( FFIUtil.basename( item_fullpath ) )
local item_path = path .. "/" .. item_name