From: Steven Barth Date: Wed, 7 May 2008 20:47:22 +0000 (+0000) Subject: * ffluci.fs.isfile: fixed several typos X-Git-Tag: 0.8.0~1064 X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=commitdiff_plain;h=c8a02eec3b578515a6defaab0a8364cfbaac1ce5 * ffluci.fs.isfile: fixed several typos --- diff --git a/core/contrib/ffluci b/core/contrib/ffluci index 183a6ad41..2c0362eba 100755 --- a/core/contrib/ffluci +++ b/core/contrib/ffluci @@ -1,4 +1,5 @@ #!/usr/bin/haserl --shell=luac package.path = "/usr/lib/lua/?.lua;/usr/lib/lua/?/init.lua;" .. package.path package.cpath = "/usr/lib/lua/?.so;" .. package.cpath +print("Content-Type: text/plain\n") require("ffluci.dispatcher").httpdispatch() \ No newline at end of file diff --git a/core/src/ffluci/fs.lua b/core/src/ffluci/fs.lua index ffa4cb84f..0ca191be9 100644 --- a/core/src/ffluci/fs.lua +++ b/core/src/ffluci/fs.lua @@ -35,9 +35,9 @@ end -- Checks whether a file exists function isfile(filename) - local fp = io.open(path, "r") - if file then file:close() end - return file ~= nil + local fp = io.open(filename, "r") + if fp then fp:close() end + return fp ~= nil end -- Returns the content of file