fix: cleaning up the cache folder caused permission issues

This commit is contained in:
krau
2025-05-19 09:23:10 +08:00
parent 9ea4857cd9
commit 729e688748
3 changed files with 11 additions and 33 deletions

View File

@@ -47,7 +47,7 @@ func Run(_ *cobra.Command, _ []string) {
return
}
common.Log.Info("正在清理缓存文件夹: ", cachePath)
if err := os.RemoveAll(cachePath); err != nil {
if err := common.RemoveAllInDir(cachePath); err != nil {
common.Log.Error("清理缓存失败: ", err)
}
}