mirror of
https://github.com/20kdc/OC-KittenOS.git
synced 2024-11-27 04:48:05 +11:00
Actually actually fix wget?
This commit is contained in:
parent
6be34ec7e6
commit
0b918437d0
@ -34,6 +34,7 @@ local function doMainWin()
|
|||||||
-- download!
|
-- download!
|
||||||
local req, err = primaryINet.request(nurl)
|
local req, err = primaryINet.request(nurl)
|
||||||
if not req then
|
if not req then
|
||||||
|
fd.close()
|
||||||
neoux.startDialog("failed request:\n" .. tostring(err))
|
neoux.startDialog("failed request:\n" .. tostring(err))
|
||||||
w.reset(doMainWin())
|
w.reset(doMainWin())
|
||||||
return
|
return
|
||||||
@ -43,12 +44,9 @@ local function doMainWin()
|
|||||||
while sRunning do
|
while sRunning do
|
||||||
local n, n2 = req.read(neo.readBufSize)
|
local n, n2 = req.read(neo.readBufSize)
|
||||||
if not n then
|
if not n then
|
||||||
req.close()
|
|
||||||
fd.close()
|
|
||||||
if n2 then
|
if n2 then
|
||||||
neoux.startDialog("failed download:\n" .. tostring(n2))
|
neoux.startDialog("failed download:\n" .. tostring(n2))
|
||||||
w.reset(doMainWin())
|
break
|
||||||
return
|
|
||||||
else
|
else
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
@ -58,11 +56,8 @@ local function doMainWin()
|
|||||||
else
|
else
|
||||||
local o, r = fd.write(n)
|
local o, r = fd.write(n)
|
||||||
if not o then
|
if not o then
|
||||||
req.close()
|
|
||||||
fd.close()
|
|
||||||
neoux.startDialog("failed write:\n" .. tostring(r))
|
neoux.startDialog("failed write:\n" .. tostring(r))
|
||||||
w.reset(doMainWin())
|
break
|
||||||
return
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -76,7 +71,7 @@ local function doMainWin()
|
|||||||
running = false
|
running = false
|
||||||
end, 0xFFFFFF, 0)
|
end, 0xFFFFFF, 0)
|
||||||
end
|
end
|
||||||
local w = neoux.create(doMainWin)
|
local w = neoux.create(doMainWin())
|
||||||
|
|
||||||
while running do
|
while running do
|
||||||
event.pull()
|
event.pull()
|
||||||
|
Loading…
Reference in New Issue
Block a user