Commit af94a865 authored by Ted Trask's avatar Ted Trask
Browse files

Modified fs.lua to survive nil parameters. Added create_directory and used...

Modified fs.lua to survive nil parameters.  Added create_directory and used within create_file and write_file.  Reviewed each read_file call to make sure handles nil return value.

git-svn-id: svn://svn.alpinelinux.org/acf/dnsmasq/trunk@1677 ab2d0c66-481e-0410-8bed-d214d4d58bed
parent 4dbdcbc2
......@@ -203,7 +203,7 @@ function setconfig(config)
local success, config = validateconfig(config)
if success then
local file = fs.read_file(configfile)
local file = fs.read_file(configfile) or ""
file = update_file(file,"domain",config.value.domain.value)
file = update_file(file,"interface",config.value.interface.value)
file = update_file(file,"listen-address",config.value.listen_address.value)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment