From 7eb2a32c5eba69691790d5471a700205dd40d70f Mon Sep 17 00:00:00 2001 From: mwoz123 Date: Wed, 11 Jul 2018 17:10:21 +0200 Subject: [PATCH] send2ebook: fix corrupted files after download (#4063) --- plugins/send2ebook.koplugin/main.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/send2ebook.koplugin/main.lua b/plugins/send2ebook.koplugin/main.lua index 99e49ff40..59e0ae0ab 100644 --- a/plugins/send2ebook.koplugin/main.lua +++ b/plugins/send2ebook.koplugin/main.lua @@ -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, "_")