modules/luci-mod-failsafe: Fix nil file descriptor error
Signed-off-by: Ekaitz Zárraga <ekaitz.zarraga@fon.com>
This commit is contained in:
parent
6e1a089b5c
commit
a16654b121
1 changed files with 7 additions and 5 deletions
|
@ -84,6 +84,7 @@ function action_flashops()
|
|||
fp = io.open(image_tmp, "w")
|
||||
end
|
||||
end
|
||||
if fp then
|
||||
if chunk then
|
||||
fp:write(chunk)
|
||||
end
|
||||
|
@ -91,6 +92,7 @@ function action_flashops()
|
|||
fp:close()
|
||||
end
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
if luci.http.formvalue("image") or luci.http.formvalue("step") then
|
||||
|
|
Loading…
Reference in a new issue