wget can now be cancelled using ctrl-alt-c

This commit is contained in:
Izaya 2017-10-09 04:29:47 +11:00
parent e7f13d8767
commit 38f6982e39
1 changed files with 2 additions and 0 deletions

View File

@ -14,6 +14,8 @@ if code ~= 200 then
end
repeat
coroutine.yield()
local t,c,C = event.get()
if t == "key" and c == 3 and C == 46 then break end
ns = R.read(2048)
f:write(ns or "")
until not ns