Skip to content

Commit

Permalink
Fix panic with upload of too long release names, fix message layout
Browse files Browse the repository at this point in the history
  • Loading branch information
hashworks committed May 25, 2016
1 parent 33d685d commit 77be85d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions srrdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,15 @@ func uploadSRRs(fps []string, username, password string) {
os.Exit(1)
}
for _, file := range response.Files {
if file.Dirname == file.Message[:len(file.Dirname)] {
messageLen := len(file.Message)
if messageLen >= len(file.Dirname) && file.Dirname == file.Message[:len(file.Dirname)] {
fmt.Println(file.Message)
} else {
fmt.Println(file.Dirname + ": " + file.Message)
if messageLen >= 3 && file.Message[:3] == " - " {
fmt.Println(file.Dirname + file.Message)
} else {
fmt.Println(file.Dirname + " - " + file.Message)
}
}
}
}
Expand Down

0 comments on commit 77be85d

Please sign in to comment.