Merge pull request #473 from ekaitz-zarraga/fix-luci-failsafe
modules/luci-mod-failsafe: Fix nil file descriptor error
This commit is contained in:
commit
892dd7383a
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