summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2009-12-28 14:11:39 +0000
committerTed Trask <ttrask01@yahoo.com>2009-12-28 14:11:39 +0000
commit5700d48f9d9d6906937003297a7f35f9ba212c29 (patch)
tree9ef68efcca91061a51fbe5ecd9af9d75dcdcda44
parent37679c1bba4cb10af9d7b8096c4c54aed6c6edbe (diff)
downloadacf-core-5700d48f9d9d6906937003297a7f35f9ba212c29.tar.bz2
acf-core-5700d48f9d9d6906937003297a7f35f9ba212c29.tar.xz
Fix fs.find bug that returned invalid file.
-rw-r--r--lib/fs.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/fs.lua b/lib/fs.lua
index 84cc6d5..63b996d 100644
--- a/lib/fs.lua
+++ b/lib/fs.lua
@@ -183,7 +183,7 @@ function find_files_as_array ( what, where, follow, t )
table.insert (t, ( string.gsub ( where .. "/" .. d, "/+", "/" ) ) )
end
end
- elseif (string.match (posix.basename(where), "^" .. what .. "$" )) then
+ elseif (string.match (posix.basename(where), "^" .. what .. "$" )) and posix.stat(where) then
table.insert (t, where )
end