mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 00:19:33 +00:00
add check for empty string on file writing
This commit is contained in:
parent
5a62f4553f
commit
06480d3171
1 changed files with 5 additions and 0 deletions
|
|
@ -52,6 +52,11 @@ function file_utils.copy_file(fname, src_path, dst_path)
|
|||
return(false)
|
||||
end
|
||||
|
||||
if (instr == nil) then
|
||||
traceError(TRACE_ERROR, TRACE_CONSOLE, string.format("Could not write the string into file %s", dst))
|
||||
return (false)
|
||||
end
|
||||
|
||||
outfile:write(instr)
|
||||
outfile:close()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue