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,11 +84,13 @@ function action_flashops()
|
|||
fp = io.open(image_tmp, "w")
|
||||
end
|
||||
end
|
||||
if chunk then
|
||||
fp:write(chunk)
|
||||
end
|
||||
if eof then
|
||||
fp:close()
|
||||
if fp then
|
||||
if chunk then
|
||||
fp:write(chunk)
|
||||
end
|
||||
if eof then
|
||||
fp:close()
|
||||
end
|
||||
end
|
||||
end
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue