Browse Source

avoid possible corrupted file names

pull/2008/head
Chris Lu 4 years ago
parent
commit
b971317a16
  1. 2
      weed/shell/command_fs_meta_load.go

2
weed/shell/command_fs_meta_load.go

@ -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,

Loading…
Cancel
Save