diff --git a/frontend/apps/cloudstorage/webdavapi.lua b/frontend/apps/cloudstorage/webdavapi.lua index dbb354a19..7086ed0ca 100644 --- a/frontend/apps/cloudstorage/webdavapi.lua +++ b/frontend/apps/cloudstorage/webdavapi.lua @@ -102,6 +102,9 @@ function WebDavApi:listFolder(address, user, pass, folder_path) --logger.dbg("WebDav catalog item=", item) -- is the path and filename of the entry. local item_fullpath = item:match("(.*)") + 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