mirror of
https://github.com/chainreactors/spray.git
synced 2025-05-05 18:27:02 +00:00
fix: path join not expect
This commit is contained in:
parent
0ca5c02de7
commit
9e74a17096
@ -270,9 +270,9 @@ func CRC16Hash(data []byte) uint16 {
|
||||
func SafePath(dir, u string) string {
|
||||
hasSlash := strings.HasPrefix(u, "/")
|
||||
if hasSlash {
|
||||
return path.Join(dir, u[1:])
|
||||
return dir + u[1:]
|
||||
} else {
|
||||
return path.Join(dir, u)
|
||||
return dir + u
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user