Add nil check for link_to
This commit is contained in:
parent
0862bcc08e
commit
9aa8be639d
@ -49,7 +49,7 @@ local function link_new(cwd, name)
|
|||||||
local absolute_path = cwd..'/'..name
|
local absolute_path = cwd..'/'..name
|
||||||
local link_to = luv.fs_realpath(absolute_path)
|
local link_to = luv.fs_realpath(absolute_path)
|
||||||
local open, entries
|
local open, entries
|
||||||
if luv.fs_stat(link_to).type == 'directory' then
|
if (link_to ~= nil) and luv.fs_stat(link_to).type == 'directory' then
|
||||||
open = false
|
open = false
|
||||||
entries = {}
|
entries = {}
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user