fix palylist and names

This commit is contained in:
nikk gitanes
2020-11-01 23:07:49 +03:00
parent 76ad8f6ade
commit a53b6a9f53
2 changed files with 9 additions and 5 deletions

View File

@@ -10,9 +10,11 @@ import (
)
func CleanFName(file string) string {
re := regexp.MustCompile(`[ !*'();:@&=+$,/?#\[\]~"]{}`)
re := regexp.MustCompile(`[ !*'();:@&=+$,/?#\[\]~"{}]`)
ret := re.ReplaceAllString(file, `_`)
ret = strings.Replace(ret, "__", "_", -1)
ret = strings.Replace(ret, "._", "_", -1)
ret = strings.Replace(ret, "_.", ".", -1)
return ret
}