|
@@ -322,7 +322,7 @@ func PortIsUse(port int) bool {
|
|
|
|
|
|
// ReplaceInvalidFilenameChars 用下划线替换不合法文件名的字符
|
|
|
func ReplaceInvalidFilenameChars(filename string) string {
|
|
|
- pattern := regexp.MustCompile(`[\\/:*?"<>|{}'()!@#$%^&\[\];,]`)
|
|
|
+ pattern := regexp.MustCompile(`[\\/:*?"<>|{}'()!@#$%^&\[\];,+=~·!¥…()—{}、:“”‘’;,《》。?]`)
|
|
|
filename = pattern.ReplaceAllString(filename, "_")
|
|
|
return strings.ReplaceAll(filename, " ", "")
|
|
|
}
|