aboutsummaryrefslogtreecommitdiff
path: root/pkg/tool/path.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2018-12-19 22:56:36 -0500
committerUnknwon <u@gogs.io>2018-12-19 22:56:36 -0500
commit8c8c37a66b4cef6fc8a995ab1b4fd6e530c49c51 (patch)
treed0acd3f54e8e190e22509f14083cd3a714c11f81 /pkg/tool/path.go
parentd4f9fd7204796a9acaab8c1606171609be52d322 (diff)
pkg/tool/path: handle Windows path separators (#5558)
Diffstat (limited to 'pkg/tool/path.go')
-rw-r--r--pkg/tool/path.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/pkg/tool/path.go b/pkg/tool/path.go
index 528db86d..e8f7bcbe 100644
--- a/pkg/tool/path.go
+++ b/pkg/tool/path.go
@@ -19,5 +19,6 @@ func IsSameSiteURLPath(url string) bool {
func SanitizePath(path string) string {
path = strings.TrimLeft(path, "/")
path = strings.Replace(path, "../", "", -1)
+ path = strings.Replace(path, "..\\", "", -1)
return path
}