projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
52d4976
)
libs/core: Fixed luci.fs.isfile
author
Steven Barth
<steven@midlink.org>
Thu, 17 Jul 2008 18:09:26 +0000
(18:09 +0000)
committer
Steven Barth
<steven@midlink.org>
Thu, 17 Jul 2008 18:09:26 +0000
(18:09 +0000)
libs/core/luasrc/fs.lua
patch
|
blob
|
history
diff --git
a/libs/core/luasrc/fs.lua
b/libs/core/luasrc/fs.lua
index 415e8e567cb2fa82d7e5fff23a63c4be29fca80a..7086088ab28267c4bb0d20264dd8eb81e6493930 100644
(file)
--- a/
libs/core/luasrc/fs.lua
+++ b/
libs/core/luasrc/fs.lua
@@
-36,9
+36,7
@@
glob = posix.glob
-- Checks whether a file exists
function isfile(filename)
- local fp = io.open(filename, "r")
- if fp then fp:close() end
- return fp ~= nil
+ return posix.stat(filename, "type") == "regular"
end
-- Returns the content of file