summaryrefslogtreecommitdiffstats
path: root/squid-model.lua
diff options
context:
space:
mode:
authorAndreas Brodmann <andreas.brodmann@gmail.com>2008-01-18 11:05:16 +0000
committerAndreas Brodmann <andreas.brodmann@gmail.com>2008-01-18 11:05:16 +0000
commitc17a9787f0546687abf12c4d265ea7f914178218 (patch)
tree67ff86522cfbb82438772d1abbc4be7c7c3f8447 /squid-model.lua
parent347b853bfb92f528fa65d9709c341692a1602175 (diff)
downloadacf-squid-c17a9787f0546687abf12c4d265ea7f914178218.tar.bz2
acf-squid-c17a9787f0546687abf12c4d265ea7f914178218.tar.xz
fix in model:dependancy_ok() to check for empty files (size:0)
git-svn-id: svn://svn.alpinelinux.org/acf/squid/trunk@617 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'squid-model.lua')
-rw-r--r--squid-model.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/squid-model.lua b/squid-model.lua
index eedd178..11dc7d0 100644
--- a/squid-model.lua
+++ b/squid-model.lua
@@ -864,8 +864,10 @@ dependancy_ok = function()
if cfgfile ~= nil then
line = cfgfile:read( "*l" )
- if string.sub( line, 1, 19 ) == "### ACF-SQUID-MAGIC" then
- retval = true
+ if line ~= nil then
+ if string.sub( line, 1, 19 ) == "### ACF-SQUID-MAGIC" then
+ retval = true
+ end
end
end