From a23368161f8fbb57814c108c77f65fa97dae74d5 Mon Sep 17 00:00:00 2001 From: jqzhang Date: Sun, 10 May 2020 20:41:21 +0800 Subject: [PATCH] bugfix sync file fail when support_group_manage is true --- fileserver.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fileserver.go b/fileserver.go index 3b69c32..1bfb7ed 100644 --- a/fileserver.go +++ b/fileserver.go @@ -878,7 +878,11 @@ func (this *Server) DownloadFromPeer(peer string, fileInfo *FileInfo) { //fmt.Println("downloadFromPeer",fileInfo) p := strings.Replace(fileInfo.Path, STORE_DIR_NAME+"/", "", 1) //filename=this.util.UrlEncode(filename) - downloadUrl = peer + "/" + Config().Group + "/" + p + "/" + filename + if Config().SupportGroupManage { + downloadUrl = peer + "/" + Config().Group + "/" + p + "/" + filename + } else { + downloadUrl = peer + "/" + p + "/" + filename + } log.Info("DownloadFromPeer: ", downloadUrl) fpath = DOCKER_DIR + fileInfo.Path + "/" + filename fpathTmp = DOCKER_DIR + fileInfo.Path + "/" + fmt.Sprintf("%s_%s", "tmp_", filename)