diff --git a/frontend/apps/cloudstorage/webdavapi.lua b/frontend/apps/cloudstorage/webdavapi.lua index e2f2461ae..917022f6b 100644 --- a/frontend/apps/cloudstorage/webdavapi.lua +++ b/frontend/apps/cloudstorage/webdavapi.lua @@ -122,7 +122,7 @@ function WebDavApi:listFolder(address, user, pass, folder_path) local is_not_collection = item:find("<[^:]*:resourcetype/>") or item:find("<[^:]*:resourcetype>") - local item_path = path == "" and item_name or path .. "/" .. item_name + local item_path = (path == "" and has_trailing_slash) and item_name or path .. "/" .. item_name if item:find("<[^:]*:collection/>") then item_name = item_name .. "/" if not is_current_dir then