From 9b4b288d01d66bfbdc7ada4d031269938f8ef7a7 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Mon, 23 Aug 2021 15:15:22 +0530 Subject: [PATCH] utils: load_config: Use filereadable to check if file exists --- lua/core/utils.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index e42cc67..a9c6188 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -169,7 +169,7 @@ M.load_config = function(reload) -- Make sure the config doesn't break the whole system if user config is not present or in bad state or not a table -- print warning texts if user config file is present -- check if the user config is present - if vim.fn.empty(vim.fn.glob(config_file)) < 1 then + if vim.fn.filereadable(vim.fn.glob(config_file)) == 1 then local present, config = pcall(require, config_name) if present then -- make sure the returned value is table