Browse Source

add warning for empty attributes

pull/781/head
Chris Lu 6 years ago
parent
commit
bea162c34c
  1. 4
      weed/server/filer_grpc_server.go

4
weed/server/filer_grpc_server.go

@ -113,6 +113,10 @@ func (fs *FilerServer) CreateEntry(ctx context.Context, req *filer_pb.CreateEntr
fs.filer.DeleteChunks(garbages) fs.filer.DeleteChunks(garbages)
if req.Entry.Attributes == nil {
return nil, fmt.Errorf("can not create entry with empty attributes")
}
err = fs.filer.CreateEntry(&filer2.Entry{ err = fs.filer.CreateEntry(&filer2.Entry{
FullPath: fullpath, FullPath: fullpath,
Attr: filer2.PbToEntryAttribute(req.Entry.Attributes), Attr: filer2.PbToEntryAttribute(req.Entry.Attributes),

Loading…
Cancel
Save