From 9c9b162cd8b36b5a1c0a11ea5793376aa56c75f8 Mon Sep 17 00:00:00 2001 From: xc Date: Thu, 9 Oct 2025 17:49:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=90=E5=8A=9F=E8=BF=94=E5=9B=9Etrue?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=E4=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scagent/core/UpFile.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scagent/core/UpFile.go b/scagent/core/UpFile.go index 607e6dd..f6fa98e 100644 --- a/scagent/core/UpFile.go +++ b/scagent/core/UpFile.go @@ -37,21 +37,23 @@ func (f *UpFileService) SendFileInfo(info FileInfo, reply *string) error { // } // 提取路径 /www/wwwroot/bidemo.com/BIU_20250918_183144.zip - fmt.Printf("SendFileInfo fileName: %s\n", info.FileName) + // fmt.Printf("SendFileInfo fileName: %s\n", info.FileName) dirPath := filepath.Dir(info.FileName) logger.Info("SendFileInfo", zap.String("dirPath", dirPath)) + // *reply = fmt.Sprintf("folder: %s is exists", dirPath) // 检查文件夹是否存在 if _, err := os.Stat(dirPath); os.IsNotExist(err) { // 文件夹不存在,创建它 if err := os.MkdirAll(dirPath, 0755); err != nil { logger.Error("SendFileInfo mkdir failed", zap.Error(err)) - *reply = fmt.Sprintf("mkdir folder: %s failed", dirPath) + // *reply = fmt.Sprintf("mkdir folder: %s failed", dirPath) // return err } } - *reply = fmt.Sprintf("folder: %s is exists", dirPath) - // *reply = true + // *reply = fmt.Sprintf("folder: %s is exists", dirPath) + // 返回true的字符串 + *reply = "true" return nil }