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
|
|
|
|
}
|