Adder: make sure we always pin recursively after adding

Regardless of the Mode option.
This commit is contained in:
Hector Sanjuan 2020-04-20 15:15:52 +02:00
parent edd91f35ae
commit ddea1a995c

View File

@ -36,6 +36,8 @@ type DAGService struct {
// New returns a new Adder with the given rpc Client. The client is used
// to perform calls to IPFS.BlockPut and Pin content on Cluster.
func New(rpc *rpc.Client, opts api.PinOptions, local bool) *DAGService {
// ensure don't Add something and pin it in direct mode.
opts.Mode = api.PinModeRecursive
return &DAGService{
rpcClient: rpc,
dests: nil,