aboutsummaryrefslogtreecommitdiff
path: root/src/ltn12.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/ltn12.lua')
-rw-r--r--src/ltn12.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ltn12.lua b/src/ltn12.lua
index ef6247d..dc49d80 100644
--- a/src/ltn12.lua
+++ b/src/ltn12.lua
@@ -171,9 +171,8 @@ function sink.file(handle, io_err)
171 return function(chunk, err) 171 return function(chunk, err)
172 if not chunk then 172 if not chunk then
173 handle:close() 173 handle:close()
174 return nil, err 174 return 1
175 end 175 else return handle:write(chunk) end
176 return handle:write(chunk)
177 end 176 end
178 else return sink.error(io_err or "unable to open file") end 177 else return sink.error(io_err or "unable to open file") end
179end 178end