Finish the download archive feature.

This commit is contained in:
zicla
2019-05-01 19:53:20 +08:00
parent adf4b9ea5a
commit 5dd0fec953
26 changed files with 492 additions and 255 deletions

View File

@ -67,7 +67,7 @@ func GetHomePath() string {
exPath = GetDevHomePath() + "/tmp"
}
return exPath
return UniformPath(exPath)
}
//获取前端静态资源的位置。如果你在开发模式下可以将这里直接返回tank/build下面的html路径。
@ -254,3 +254,10 @@ func CopyFile(srcPath string, destPath string) (nBytes int64) {
nBytes, err = io.Copy(destFile, srcFile)
return nBytes
}
//路径归一化处理,把\\替换成/
func UniformPath(path string) string {
return strings.Replace(path, "\\", "/", -1)
}