mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Reorg
This commit is contained in:
14
pkg/utils/windows.go
Normal file
14
pkg/utils/windows.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"runtime"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// FixWindowsPath replaces \ with / in the given path because sometimes the \ isn't recognized as valid on windows
|
||||
func FixWindowsPath(str string) string {
|
||||
if runtime.GOOS == "windows" {
|
||||
return strings.Replace(str, "\\", "/", -1)
|
||||
}
|
||||
return str
|
||||
}
|
||||
Reference in New Issue
Block a user