File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 9
9
10
10
cmdkit "gx/ipfs/QmSP88ryZkHSRn1fnngAaV2Vcn63WUJzAavnRM9CVdU1Ky/go-ipfs-cmdkit"
11
11
12
+ cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv"
13
+ apicid "gx/ipfs/QmNWQygwYxgz3QzXG2ytTkrHkZ4HnnSh94ASox3JjktFcR/go-cidutil/apicid"
14
+
12
15
cmds "github.com/ipfs/go-ipfs/commands"
13
16
core "github.com/ipfs/go-ipfs/core"
14
17
e "github.com/ipfs/go-ipfs/core/commands/e"
@@ -27,7 +30,7 @@ type LsLink struct {
27
30
}
28
31
29
32
type LsObject struct {
30
- Hash string
33
+ Hash apicid. Hash
31
34
Size uint64
32
35
Type string
33
36
Links []LsLink
@@ -129,7 +132,7 @@ possible, please use 'ipfs ls' instead.
129
132
t := unixFSNode .GetType ()
130
133
131
134
output .Objects [hash ] = & LsObject {
132
- Hash : c . String ( ),
135
+ Hash : apicid . FromCid ( c ),
133
136
Type : t .String (),
134
137
Size : unixFSNode .GetFilesize (),
135
138
}
@@ -187,6 +190,11 @@ possible, please use 'ipfs ls' instead.
187
190
},
188
191
Marshalers : cmds.MarshalerMap {
189
192
cmds .Text : func (res cmds.Response ) (io.Reader , error ) {
193
+ _ , err := cmdenv .NewCidBaseHandlerLegacy (res .Request ()).UseGlobal ().Proc ()
194
+ if err != nil {
195
+ return nil , err
196
+ }
197
+
190
198
v , err := unwrapOutput (res .Output ())
191
199
if err != nil {
192
200
return nil , err
You can’t perform that action at this time.
0 commit comments