Skip to content

Commit

Permalink
fix: 修复下载主题填错url时, 没有删除文件夹导致无法重新安装的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
JabinGP committed Oct 16, 2021
1 parent 1ec4d7a commit 4da62f3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions theme/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ func DownloadTheme(themeZipURL string, themeName string) error {
if err != nil {
log.Errorln("解压失败")
log.Errorln(err)
rmErr := os.RemoveAll(path)
if rmErr != nil {
log.Errorln("删除解压失败的文件夹失败")
log.Errorln(rmErr)
return rmErr
}
return err
}
log.Debugln("解压成功,解压到" + path)
Expand Down

0 comments on commit 4da62f3

Please sign in to comment.