X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=modules%2Fbase%2Fluasrc%2Fltn12.lua;fp=modules%2Fbase%2Fluasrc%2Fltn12.lua;h=b59fb8c48af0c6b31b8155e1b4e00155138ceb04;hp=9371290c61778ee4f3e5bb23c46d9796190e89b3;hb=7bd68db7d702c5951d192359f2dd6b256a98c62d;hpb=a226f199accb4a9adce10d3373fb832109e60876 diff --git a/modules/base/luasrc/ltn12.lua b/modules/base/luasrc/ltn12.lua index 9371290c6..b59fb8c48 100644 --- a/modules/base/luasrc/ltn12.lua +++ b/modules/base/luasrc/ltn12.lua @@ -144,6 +144,7 @@ function source.file(handle, io_err) if handle then return function() local chunk = handle:read(BLOCKSIZE) + if chunk and chunk:len() == 0 then chunk = nil end if not chunk then handle:close() end return chunk end