Browse Source

fix edge cases

pull/1189/head
Chris Lu 5 years ago
parent
commit
8fbc0a9163
  1. 3
      weed/server/volume_grpc_copy.go
  2. 4
      weed/server/volume_grpc_erasure_coding.go

3
weed/server/volume_grpc_copy.go

@ -214,6 +214,9 @@ func (vs *VolumeServer) CopyFile(req *volume_server_pb.CopyFileRequest, stream v
} }
} }
if fileName == "" { if fileName == "" {
if req.IgnoreSourceFileNotFound {
return nil
}
return fmt.Errorf("CopyFile not found ec volume id %d", req.VolumeId) return fmt.Errorf("CopyFile not found ec volume id %d", req.VolumeId)
} }
} }

4
weed/server/volume_grpc_erasure_coding.go

@ -200,9 +200,7 @@ func (vs *VolumeServer) VolumeEcShardsDelete(ctx context.Context, req *volume_se
if err := os.Remove(baseFilename + ".ecj"); err != nil { if err := os.Remove(baseFilename + ".ecj"); err != nil {
return nil, err return nil, err
} }
if err := os.Remove(baseFilename + ".vif"); err != nil {
return nil, err
}
os.Remove(baseFilename + ".vif")
} }
return &volume_server_pb.VolumeEcShardsDeleteResponse{}, nil return &volume_server_pb.VolumeEcShardsDeleteResponse{}, nil

Loading…
Cancel
Save