Browse Source

修正反斜杠替换的错误

master
453530270@qq.com 2 years ago
parent
commit
2582ad2c2e
  1. BIN
      fssc/fssc
  2. 3
      fssc/internal/handler/handler.go

BIN
fssc/fssc

Binary file not shown.

3
fssc/internal/handler/handler.go

@ -118,7 +118,8 @@ func Supfile(w http.ResponseWriter, r *http.Request) {
bpath := util.Base64dec(sbpath[0]) bpath := util.Base64dec(sbpath[0])
bfile := util.Base64dec(sbfile[0]) bfile := util.Base64dec(sbfile[0])
// 替换 反斜杠 // 替换 反斜杠
bbpath := strings.Replace(bpath, "/", "\\", -1) bbpath := strings.Replace(bpath, "\\", "/", -1)
//replacedPath := strings.ReplaceAll(path, "\\", "/")
// 拼装, 文件的实际地址 // 拼装, 文件的实际地址
ziprl := filepath.Join(config.G.FilePath, "/", bbpath, "/", bfile) ziprl := filepath.Join(config.G.FilePath, "/", bbpath, "/", bfile)

Loading…
Cancel
Save