refactor(#2731): resolve warnings

This commit is contained in:
Alexander Courtis 2024-05-26 15:43:01 +10:00
parent 517e4fbb9e
commit 9c0526b7b0

View file

@ -12,7 +12,7 @@ local M = {}
local function create_and_notify(file)
events._dispatch_will_create_file(file)
local ok, fd = pcall(vim.loop.fs_open, file, "w", 420)
if not ok then
if not ok or type(fd) ~= "number" then
notify.error("Couldn't create file " .. notify.render_path(file))
return
end