mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-22 06:07:24 +08:00
avoid possible corrupted file names
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
|
|
||||||
@@ -72,6 +73,7 @@ func (c *commandFsMetaLoad) Do(args []string, commandEnv *CommandEnv, writer io.
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fullEntry.Entry.Name = strings.ReplaceAll(fullEntry.Entry.Name, "/", "x")
|
||||||
if err := filer_pb.CreateEntry(client, &filer_pb.CreateEntryRequest{
|
if err := filer_pb.CreateEntry(client, &filer_pb.CreateEntryRequest{
|
||||||
Directory: fullEntry.Dir,
|
Directory: fullEntry.Dir,
|
||||||
Entry: fullEntry.Entry,
|
Entry: fullEntry.Entry,
|
||||||
|
Reference in New Issue
Block a user