mirror of
https://github.com/stashapp/stash.git
synced 2025-12-16 21:34:14 +01:00
15 lines
No EOL
250 B
Go
15 lines
No EOL
250 B
Go
package utils
|
|
|
|
import (
|
|
"runtime"
|
|
"strings"
|
|
)
|
|
|
|
// Sometimes the \ isn't recognized as valid on windows
|
|
func FixWindowsPath(str string) string {
|
|
if runtime.GOOS == "windows" {
|
|
return strings.Replace(str, "\\", "/", -1)
|
|
} else {
|
|
return str
|
|
}
|
|
} |