summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/getopts.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/getopts.lua b/lib/getopts.lua
index e0e7469..9668db2 100644
--- a/lib/getopts.lua
+++ b/lib/getopts.lua
@@ -1,7 +1,9 @@
module (..., package.seeall)
+require("fs")
function getoptsfromfile (file, search, filter)
local opts = nil
+ if not (fs.is_file(file)) then return nil end
local conf_file = fs.read_file_as_array ( file )
for i=1,table.maxn(conf_file) do
local l = conf_file[i]