Add nil check for link_to
This commit is contained in:
parent
0862bcc08e
commit
17c8a20a19
@ -49,7 +49,7 @@ local function link_new(cwd, name)
|
||||
local absolute_path = cwd..'/'..name
|
||||
local link_to = luv.fs_realpath(absolute_path)
|
||||
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
|
||||
entries = {}
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user