fix: path join not expect

This commit is contained in:
M09Ic committed 2024-11-01 12:25:53 +08:00
1 parent bcc29ce246
commit 0e8da28cfc
1 file changed
+2 -2
+2 -2
View File
@@ -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
}
}