From 5ec7a43c6f0a6cd1369da101fa0e3f1f12d99973 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/alpine-baselayout/trunk@1677 ab2d0c66-481e-0410-8bed-d214d4d58bed --- syslog-model.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'syslog-model.lua') diff --git a/syslog-model.lua b/syslog-model.lua index 38920b3..ac6904f 100644 --- a/syslog-model.lua +++ b/syslog-model.lua @@ -180,7 +180,7 @@ end function getconfig() local config = {} if (fs.is_file(configfile)) then - local configcontent = format.opts_to_table(string.sub((format.parse_ini_file(fs.read_file(configfile), "", "SYSLOGD_OPTS") or ""),2,-2)) + local configcontent = format.opts_to_table(string.sub((format.parse_ini_file(fs.read_file(configfile) or "", "", "SYSLOGD_OPTS") or ""),2,-2)) config = makeconfig(configcontent) else config = makeconfig() -- cgit v1.2.3