diff --git a/weed/filesys/file.go b/weed/filesys/file.go index 122aeeef4..2b1eb5a44 100644 --- a/weed/filesys/file.go +++ b/weed/filesys/file.go @@ -336,20 +336,20 @@ func (file *File) saveEntry(entry *filer_pb.Entry) error { file.wfs.mapPbIdFromLocalToFiler(entry) defer file.wfs.mapPbIdFromFilerToLocal(entry) - request := &filer_pb.UpdateEntryRequest{ + request := &filer_pb.CreateEntryRequest{ Directory: file.dir.FullPath(), Entry: entry, Signatures: []int32{file.wfs.signature}, } glog.V(4).Infof("save file entry: %v", request) - _, err := client.UpdateEntry(context.Background(), request) + _, err := client.CreateEntry(context.Background(), request) if err != nil { glog.Errorf("UpdateEntry file %s/%s: %v", file.dir.FullPath(), file.Name, err) return fuse.EIO } - file.wfs.metaCache.UpdateEntry(context.Background(), filer.FromPbEntry(request.Directory, request.Entry)) + file.wfs.metaCache.InsertEntry(context.Background(), filer.FromPbEntry(request.Directory, request.Entry)) return nil })