Download failed if folder name contain the character ':' in Windows
@@ -14,13 +14,15 @@ import (
"strings"
"net/http"
"errors"
+ "encoding/base64"
)
const BUILD_INFO_DETAILS = "details"
func getBuildDir(buildName, buildNumber string) (string, error) {
tempDir := os.TempDir()
- buildsDir := tempDir + "/jfrog/builds/" + buildName + "_" + buildNumber + "/"
+ encodedDirName := base64.StdEncoding.EncodeToString([]byte(buildName + "_" + buildNumber))
+ buildsDir := tempDir + "/jfrog/builds/" + encodedDirName + "/"
err := os.MkdirAll(buildsDir, 0777)
if cliutils.CheckError(err) != nil {
return "", err
@@ -175,7 +177,6 @@ type Vcs struct {
VcsRevision string `json:"vcsRevision,omitempty"`
}
-
type BuildGeneralDetails struct {
Timestamp time.Time `json:"Timestamp,omitempty"`
}
