diff --git a/frontend/apps/cloudstorage/webdav.lua b/frontend/apps/cloudstorage/webdav.lua index 044b52b3f..ffb3ec8b1 100644 --- a/frontend/apps/cloudstorage/webdav.lua +++ b/frontend/apps/cloudstorage/webdav.lua @@ -126,6 +126,14 @@ The start folder is appended to the server path.]]) text = text_button_ok, callback = function() local fields = MultiInputDialog:getFields() + + -- make sure the URL is a valid path + if fields[5] ~= "" then + if string.sub(fields[5], 1, 1) ~= '/' then + fields[5] = '/' .. fields[5] + end + end + if fields[1] ~= "" and fields[2] ~= "" then if item then -- edit diff --git a/frontend/apps/cloudstorage/webdavapi.lua b/frontend/apps/cloudstorage/webdavapi.lua index edd5f5330..995a501c3 100644 --- a/frontend/apps/cloudstorage/webdavapi.lua +++ b/frontend/apps/cloudstorage/webdavapi.lua @@ -164,6 +164,7 @@ end function WebDavApi:downloadFile(file_url, user, pass, local_path) socketutil:set_timeout(socketutil.FILE_BLOCK_TIMEOUT, socketutil.FILE_TOTAL_TIMEOUT) + logger.dbg("WebDavApi: downloading file: ", file_url) local code, _, status = socket.skip(1, http.request{ url = file_url, method = "GET",