send2ebook: fix corrupted files after download (#4063)

pull/4058/merge
mwoz123 6 years ago committed by poire-z
parent 916534059f
commit 7eb2a32c5e

@ -9,6 +9,7 @@ local LuaSettings = require("frontend/luasettings")
local UIManager = require("ui/uimanager")
local NetworkMgr = require("ui/network/manager")
local WidgetContainer = require("ui/widget/container/widgetcontainer")
local ftp = require("socket.ftp")
local logger = require("logger")
local util = require("util")
local _ = require("gettext")
@ -26,7 +27,7 @@ local send2ebook_settings
function Send2Ebook:downloadFileAndRemove(connection_url, remote_path, local_download_path)
local url = connection_url .. remote_path
local response = FtpApi:ftpGet(url)
local response = ftp.get(url ..";type=i")
if response ~= nil then
local_download_path = util.fixUtf8(local_download_path, "_")

Loading…
Cancel
Save