From 273c1f75a88afa6ad22d6337263ece47192d67a1 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Fri, 26 Oct 2012 21:11:28 +0000 Subject: Fix exception for broken symlink (cherry picked from commit a834fd1c09f1a0d8c03ba96268d6059b1014b196) --- fs.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs.lua') diff --git a/fs.lua b/fs.lua index 2fffe14..45287b9 100644 --- a/fs.lua +++ b/fs.lua @@ -178,7 +178,7 @@ function find_files_as_array ( what, where, follow, t ) local link if follow and is_link(where) then link = posix.readlink(where) - if not string.find(link, "^/") then + if link and not string.find(link, "^/") then link = posix.dirname(where).."/"..link end end -- cgit v1.2.3