From af94a865b1c9770311abeda58eec158407d58f49 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Tue, 13 Jan 2009 16:01:06 +0000 Subject: 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 --- dnsmasq-model.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dnsmasq-model.lua b/dnsmasq-model.lua index 3625cf8..1e6c5b8 100644 --- a/dnsmasq-model.lua +++ b/dnsmasq-model.lua @@ -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) -- cgit v1.2.3