use backticks instead of double quotes to avoid escaped additionally in regex

This commit is contained in:
bingoohuang
2021-02-18 14:05:28 +08:00
parent 12a7833586
commit eab6e31d34
4 changed files with 4 additions and 4 deletions

View File

@@ -23,7 +23,7 @@ import (
"github.com/chrislusf/seaweedfs/weed/util"
)
var fileNameEscaper = strings.NewReplacer("\\", "\\\\", "\"", "\\\"")
var fileNameEscaper = strings.NewReplacer(`\`, `\\`, `"`, `\"`)
func (vs *VolumeServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request) {