summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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