Updated getEscapedName with slash to dash instead of space
Remove only the first slash, convert the rest to dash
This commit is contained in:
parent
cb46e8751b
commit
31e0340959
1 changed files with 2 additions and 1 deletions
|
@ -63,6 +63,7 @@ func replace(s1 string, s2 string, s3 string) string {
|
||||||
return strings.Replace(s3, s1, s2, -1)
|
return strings.Replace(s3, s1, s2, -1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Escape beginning slash "/", convert all others to dash "-"
|
||||||
func getEscapedName(name string) string {
|
func getEscapedName(name string) string {
|
||||||
return strings.Replace(name, "/", "", -1)
|
return strings.Replace(strings.TrimPrefix(name, "/"), "/", "-", -1)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue