wimp-get/platform/windows.go

18 lines
254 B
Go
Raw Normal View History

2017-05-30 17:03:41 +02:00
// +build windows
package platform
import(
"regexp"
)
func SanitiseFilename(filename string) (newName string, e error) {
2017-05-30 19:31:31 +02:00
r, e := regexp.Compile("[\\?<>:/\"\\\\|\\*]")
2017-05-30 17:03:41 +02:00
if e != nil {
return
}
newName = r.ReplaceAllString(filename, "")
return
}