webdavapi: fix 'resourcetype' property check

reviewable/pr12369/r3
hius07 3 weeks ago committed by Frans de Jonge
parent 84ed68ba82
commit ee5a4169d1

@ -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

Loading…
Cancel
Save