1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-06-02 16:50:25 +02:00

avoid possible corrupted file names

This commit is contained in:
Chris Lu 2021-04-15 11:41:34 -07:00
parent 283d703d50
commit b971317a16

View file

@ -4,6 +4,7 @@ import (
"fmt"
"io"
"os"
"strings"
"github.com/golang/protobuf/proto"
@ -72,6 +73,7 @@ func (c *commandFsMetaLoad) Do(args []string, commandEnv *CommandEnv, writer io.
return err
}
fullEntry.Entry.Name = strings.ReplaceAll(fullEntry.Entry.Name, "/", "x")
if err := filer_pb.CreateEntry(client, &filer_pb.CreateEntryRequest{
Directory: fullEntry.Dir,
Entry: fullEntry.Entry,