From 779ad443f9443f2158df7b6b0257e68b2565714b Mon Sep 17 00:00:00 2001 From: yxh Date: Mon, 10 Jan 2022 22:30:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=92=E4=BB=B6=E6=8C=89=E8=A3=85=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/system/service/plugins_manage.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/system/service/plugins_manage.go b/app/system/service/plugins_manage.go index efaad7d..9268487 100644 --- a/app/system/service/plugins_manage.go +++ b/app/system/service/plugins_manage.go @@ -14,7 +14,6 @@ import ( "gfast/app/common/global" "gfast/app/system/dao" "gfast/app/system/model" - "gfast/library" "github.com/gogf/gf/container/garray" "github.com/gogf/gf/container/gmap" "github.com/gogf/gf/encoding/gcompress" @@ -374,7 +373,7 @@ func (s *pluginsManage) downloadAndInstall(ctx context.Context, url string) erro // InstallFile 安装插件文件 func (s *pluginsManage) InstallFile(ctx context.Context, data []byte, fileName string) (err error) { //获取插件下载路径 - downloadPath := library.GetExcPath() + "/data/installPlugins" + downloadPath := gfile.MainPkgPath() + "/data/installPlugins" if !gfile.IsDir(downloadPath) { err = gfile.Mkdir(downloadPath) if err != nil { @@ -411,7 +410,7 @@ func (s *pluginsManage) InstallFile(ctx context.Context, data []byte, fileName s } //复制插件文件到对应目录 //1.后端 - err = gfile.Copy(downloadPath+"/"+fileName+"/go/", library.GetExcPath()) + err = gfile.Copy(downloadPath+"/"+fileName+"/go/", gfile.MainPkgPath()) if err != nil { return }