fix: ensure paths are recreated after calling :AvanteClear to avoid errors (#678)

This commit is contained in:
Dennis Dillert 2024-10-05 11:49:15 +02:00 committed by GitHub
parent 0705234991
commit c3848d086c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -181,6 +181,9 @@ P.available = function() return templates ~= nil end
P.clear = function()
P.cache_path:rm({ recursive = true })
P.history_path:rm({ recursive = true })
if not P.cache_path:exists() then P.cache_path:mkdir({ parents = true }) end
if not P.history_path:exists() then P.history_path:mkdir({ parents = true }) end
end
return P