From 5700d48f9d9d6906937003297a7f35f9ba212c29 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Mon, 28 Dec 2009 14:11:39 +0000 Subject: Fix fs.find bug that returned invalid file. --- lib/fs.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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 -- cgit v1.2.3