Skip to content
This repository has been archived by the owner on Aug 14, 2020. It is now read-only.

Commit

Permalink
Merge pull request #4 from blablacar/display-dash
Browse files Browse the repository at this point in the history
display aci with '-' in name in the web page
  • Loading branch information
Derek Gonyeo committed May 27, 2016
2 parents 45f764a + 86a697d commit 656498c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -597,9 +597,16 @@ func listACIs() ([]aci, error) {
for _, file := range files {
_, fname := path.Split(file.Name())
tokens := strings.Split(fname, "-")
if len(tokens) != 4 {
if len(tokens) < 4 {
continue
}
if len(tokens) > 4 {
diff := len(tokens) - 4
tokens[0] = strings.Join(tokens[0:len(tokens) - 3], "-")
tokens[1] = tokens[1 + diff]
tokens[2] = tokens[2 + diff]
tokens[3] = tokens[3 + diff]
}

tokens1 := strings.Split(tokens[3], ".")
if len(tokens1) != 2 {
Expand Down

0 comments on commit 656498c

Please sign in to comment.