From 76cfcbf254fa4a6ed792777cb7f8606bae391e73 Mon Sep 17 00:00:00 2001 From: liuxiaolong <736321739@qq.com> Date: 星期四, 19 十二月 2019 15:44:36 +0800 Subject: [PATCH] fix remove to removeAll --- service/SysService.go | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/service/SysService.go b/service/SysService.go index a13458c..c3626ba 100644 --- a/service/SysService.go +++ b/service/SysService.go @@ -201,12 +201,15 @@ unZipPath := configPatchPath+"/"+identifier+"_basic/" if util.Exists(unZipPath) { //姝ょ増鏈凡缁忔洿鏂拌繃 - return true - } else { - if !util.CreateDirectory(unZipPath) { + rmErr := os.RemoveAll(unZipPath) + if rmErr !=nil { return false } } + if !util.CreateDirectory(unZipPath) { + return false + } + zipFilePath := configPatchPath+"/"+identifier+ext err := util.UnZip(zipFilePath, unZipPath) if err !=nil { -- Gitblit v1.8.0