Skip to content

Commit 563ac38

Browse files
authored
Merge pull request #6754 from hcg1314/fix/6748
fix bug 6748
2 parents b3aa770 + 6155fd1 commit 563ac38

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

core/coreapi/unixfs.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,10 @@ func (api *UnixfsAPI) Add(ctx context.Context, files files.Node, opts ...options
127127
return nil, err
128128
}
129129

130-
if err := api.provider.Provide(nd.Cid()); err != nil {
131-
return nil, err
130+
if !settings.OnlyHash {
131+
if err := api.provider.Provide(nd.Cid()); err != nil {
132+
return nil, err
133+
}
132134
}
133135

134136
return path.IpfsPath(nd.Cid()), nil

0 commit comments

Comments
 (0)