Skip to content

Commit

Permalink
bugfix sync file fail when support_group_manage is true
Browse files Browse the repository at this point in the history
  • Loading branch information
sjqzhang committed May 10, 2020
1 parent df5cb49 commit ac362f3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fileserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ac362f3

Please sign in to comment.