mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
send2ebook: fix corrupted files after download (#4063)
This commit is contained in:
@@ -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, "_")
|
||||
|
||||
Reference in New Issue
Block a user