From e336983fd2e109a9119c1a42aeef20f588e44d46 Mon Sep 17 00:00:00 2001 From: hius07 <62179190+hius07@users.noreply.github.com> Date: Wed, 25 May 2022 18:02:46 +0300 Subject: [PATCH] Cloudstorage WebDAV: more fix slash in server address (#9128) Honor server addresses with or without trailing slash. Regression since #9061. Closes #9125. --- frontend/apps/cloudstorage/webdavapi.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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