2
0
mirror of https://github.com/koreader/koreader synced 2024-11-10 01:10:34 +00:00

webdavapi: fix 'resourcetype' property check

This commit is contained in:
hius07 2024-08-31 10:48:58 +03:00 committed by Frans de Jonge
parent 84ed68ba82
commit ee5a4169d1

View File

@ -105,7 +105,7 @@ function WebDavApi:listFolder(address, user, pass, folder_path, folder_mode)
local item_fullpath = item:match("<[^:]*:href[^>]*>(.*)</[^:]*:href>")
local item_name = FFIUtil.basename(util.htmlEntitiesToUtf8(util.urlDecode(item_fullpath)))
local is_current_dir = item_name == string.sub(folder_path, -#item_name)
local is_not_collection = item:find("<[^:]*:resourcetype/>") or
local is_not_collection = item:find("<[^:]*:resourcetype%s*/>") or
item:find("<[^:]*:resourcetype></[^:]*:resourcetype>")
local item_path = path .. "/" .. item_name