From bdc4888a0c21578ddc4664a0e51f953b3ff48683 Mon Sep 17 00:00:00 2001 From: BaoXuebin Date: Wed, 1 Dec 2021 23:37:53 +0800 Subject: [PATCH] fix bug: bak file path --- service/source_file.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/source_file.go b/service/source_file.go index 8cba8ab..57cf323 100644 --- a/service/source_file.go +++ b/service/source_file.go @@ -76,7 +76,7 @@ func UpdateLedgerSourceFileContent(c *gin.Context) { } sourceFilePath := ledgerConfig.DataPath + "/" + updateSourceFileForm.Path - targetFilePath := ledgerConfig.DataPath + "/bak/" + time.Now().Format("20060102150405") + "_" + updateSourceFileForm.Path + targetFilePath := ledgerConfig.DataPath + "/bak/" + time.Now().Format("20060102150405") + "_" + strings.ReplaceAll(updateSourceFileForm.Path, "/", "_") // 备份数据 if ledgerConfig.IsBak { err := script.CopyFile(sourceFilePath, targetFilePath)