mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
add warning for empty attributes
This commit is contained in:
parent
d3be8e022f
commit
bea162c34c
|
@ -113,6 +113,10 @@ func (fs *FilerServer) CreateEntry(ctx context.Context, req *filer_pb.CreateEntr
|
|||
|
||||
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{
|
||||
FullPath: fullpath,
|
||||
Attr: filer2.PbToEntryAttribute(req.Entry.Attributes),
|
||||
|
|
Loading…
Reference in a new issue