Merge pull request #184 from dontrebootme/master

Updated getEscapedName with slash to dash instead of space
This commit is contained in:
Vincent Demeester 2016-02-03 22:09:52 +01:00
commit d3598021b7

View file

@ -63,6 +63,7 @@ func replace(s1 string, s2 string, s3 string) string {
return strings.Replace(s3, s1, s2, -1)
}
// Escape beginning slash "/", convert all others to dash "-"
func getEscapedName(name string) string {
return strings.Replace(name, "/", "", -1)
return strings.Replace(strings.TrimPrefix(name, "/"), "/", "-", -1)
}