fix(fs): error when plugin directory to delete is not a valid directory

This commit is contained in:
Folke Lemaitre 2024-01-19 16:09:28 +01:00
parent 96584866b9
commit 47d4baafcc
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ M.clean = {
assert(dir:find(Config.options.root, 1, true) == 1, self.plugin.dir .. " should be under packpath!")
local stat = vim.loop.fs_lstat(dir)
assert(stat.type == "directory", self.plugin.dir .. " should be a directory!")
assert(stat and stat.type == "directory", self.plugin.dir .. " should be a directory!")
Util.walk(dir, function(path, _, type)
if type == "directory" then