Skip to content

Commit 9c0526b

Browse files
committed
refactor(#2731): resolve warnings
1 parent 517e4fb commit 9c0526b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/nvim-tree/actions/fs/create-file.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ local M = {}
1212
local function create_and_notify(file)
1313
events._dispatch_will_create_file(file)
1414
local ok, fd = pcall(vim.loop.fs_open, file, "w", 420)
15-
if not ok then
15+
if not ok or type(fd) ~= "number" then
1616
notify.error("Couldn't create file " .. notify.render_path(file))
1717
return
1818
end

0 commit comments

Comments
 (0)