mirror of
https://github.com/chainreactors/spray.git
synced 2026-10-28 19:40:49 +00:00
fix: path join not expect
This commit is contained in:
1 parent
bcc29ce246
commit
0e8da28cfc
1 file changed
+2
-2
+2
-2
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user