WebDAV: fix bugs when start folder starts with "/" (#9688)

This commit is contained in:
weijiuqiao
2022-10-29 23:45:52 +08:00
committed by GitHub
parent d7c63edca6
commit e8cd2ba498
2 changed files with 13 additions and 5 deletions

View File

@@ -17,7 +17,7 @@ function WebDav:run(address, user, pass, path)
end
function WebDav:downloadFile(item, address, username, password, local_path, callback_close)
local code_response = WebDavApi:downloadFile(address .. WebDavApi:urlEncode( item.url ), username, password, local_path)
local code_response = WebDavApi:downloadFile(WebDavApi:getJoinedPath(address, item.url), username, password, local_path)
if code_response == 200 then
local __, filename = util.splitFilePathName(local_path)
if G_reader_settings:isTrue("show_unsupported") and not DocumentRegistry:hasProvider(filename) then