chore: change the separator of the SAFE_PATHS environment variable to the default separator of the operating system platform (i.e., ; in Windows and : in other systems)

This commit is contained in:
wwqgtxx 2025-05-05 01:32:25 +08:00
parent 86c127db8b
commit 50d7834e09

View File

@ -38,7 +38,7 @@ var Path = func() *path {
}
var safePaths []string
for _, safePath := range strings.Split(os.Getenv("SAFE_PATHS"), ":") {
for _, safePath := range filepath.SplitList(os.Getenv("SAFE_PATHS")) {
safePath = strings.TrimSpace(safePath)
if len(safePath) == 0 {
continue