Дата+мяу=ЛАВ

This commit is contained in:
Igor Timofeev 2018-05-02 16:44:06 +03:00
parent 9c72d8e3f7
commit cb069bcb40

View File

@ -157,7 +157,7 @@ local function download(url, path, totalProgress)
until responseCode until responseCode
-- Downloading file by chunks -- Downloading file by chunks
local contentLength = 100 local contentLength = 12 * 1024 * 1024
local currentLength = 0 local currentLength = 0
if responseData and responseData["Content-Length"] then if responseData and responseData["Content-Length"] then
@ -167,7 +167,7 @@ local function download(url, path, totalProgress)
while true do while true do
local data, reason = requestHandle.read(math.huge) local data, reason = requestHandle.read(math.huge)
if data then if data then
currentLength = currentLength + unicode.len(data) currentLength = currentLength + #data
local percent = currentLength / contentLength local percent = currentLength / contentLength
progressBar(y, percent, properties.localization.currentFile, totalProgress, tostring(math.ceil(percent)), path) progressBar(y, percent, properties.localization.currentFile, totalProgress, tostring(math.ceil(percent)), path)