File tree 8 files changed +28
-9
lines changed
8 files changed +28
-9
lines changed Original file line number Diff line number Diff line change @@ -19,9 +19,9 @@ import (
19
19
cmds "gx/ipfs/QmPXR4tNdLbp8HsZiPMjpsgqphX9Vhw2J6Jh5MKH2ovW3D/go-ipfs-cmds"
20
20
mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash"
21
21
pb "gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb"
22
- mfs "gx/ipfs/QmRkrpnhZqDxTxwGCsDbuZMr7uCFZHH6SGfrcjgEQwxF3t/go-mfs"
23
22
cmdkit "gx/ipfs/QmSP88ryZkHSRn1fnngAaV2Vcn63WUJzAavnRM9CVdU1Ky/go-ipfs-cmdkit"
24
23
files "gx/ipfs/QmSP88ryZkHSRn1fnngAaV2Vcn63WUJzAavnRM9CVdU1Ky/go-ipfs-cmdkit/files"
24
+ mfs "gx/ipfs/QmUbAxuGfnfiWvAcJxZqJNFZe3wPpEmuNA5YTWk96YKKcp/go-mfs"
25
25
offline "gx/ipfs/QmcRC35JF2pJQneAxa5LdQBQRumWggccWErogSrCkS1h8T/go-ipfs-exchange-offline"
26
26
bstore "gx/ipfs/QmegPGspn3RpTMQ23Fd3GVVMopo1zsEMurudbFMZ5UXBLH/go-ipfs-blockstore"
27
27
)
Original file line number Diff line number Diff line change @@ -29,8 +29,8 @@ import (
29
29
cmds "gx/ipfs/QmPXR4tNdLbp8HsZiPMjpsgqphX9Vhw2J6Jh5MKH2ovW3D/go-ipfs-cmds"
30
30
mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash"
31
31
logging "gx/ipfs/QmRREK2CAZ5Re2Bd9zZFG6FeYDppUWt5cMgsoUEp3ktgSr/go-log"
32
- mfs "gx/ipfs/QmRkrpnhZqDxTxwGCsDbuZMr7uCFZHH6SGfrcjgEQwxF3t/go-mfs"
33
32
cmdkit "gx/ipfs/QmSP88ryZkHSRn1fnngAaV2Vcn63WUJzAavnRM9CVdU1Ky/go-ipfs-cmdkit"
33
+ mfs "gx/ipfs/QmUbAxuGfnfiWvAcJxZqJNFZe3wPpEmuNA5YTWk96YKKcp/go-mfs"
34
34
offline "gx/ipfs/QmcRC35JF2pJQneAxa5LdQBQRumWggccWErogSrCkS1h8T/go-ipfs-exchange-offline"
35
35
ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format"
36
36
)
@@ -482,7 +482,7 @@ Examples:
482
482
res .SetError (err , cmdkit .ErrNormal )
483
483
return
484
484
}
485
- out .Entries [0 ].Hash = nd .Cid (). String ( )
485
+ out .Entries [0 ].Hash = apicid . FromCid ( nd .Cid ())
486
486
}
487
487
res .SetOutput (out )
488
488
return
Original file line number Diff line number Diff line change @@ -38,7 +38,6 @@ import (
38
38
exchange "gx/ipfs/QmR1nncPsZR14A4hWr39mq8Lm7BGgS68bHVT9nop8NpWEM/go-ipfs-exchange-interface"
39
39
logging "gx/ipfs/QmRREK2CAZ5Re2Bd9zZFG6FeYDppUWt5cMgsoUEp3ktgSr/go-log"
40
40
quic "gx/ipfs/QmRgFWjY1idcimoGvSAzNenfptnciZnPHuW3P2yq9VgaqA/go-libp2p-quic-transport"
41
- mfs "gx/ipfs/QmRkrpnhZqDxTxwGCsDbuZMr7uCFZHH6SGfrcjgEQwxF3t/go-mfs"
42
41
goprocess "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess"
43
42
rhelpers "gx/ipfs/QmSFHnkFwayfnRKK1Z8jBUauMYMkHrZpQyvbxkFoPYb1VQ/go-libp2p-routing-helpers"
44
43
mamask "gx/ipfs/QmSMZwvs3n4GBikZ7hKzT17c3bk65FmyZo2JqtJ16swqCv/multiaddr-filter"
@@ -52,6 +51,7 @@ import (
52
51
rhost "gx/ipfs/QmUEqyXr97aUbNmQADHYNknjwjjdVpJXEt1UZXmSG81EV4/go-libp2p/p2p/host/routed"
53
52
identify "gx/ipfs/QmUEqyXr97aUbNmQADHYNknjwjjdVpJXEt1UZXmSG81EV4/go-libp2p/p2p/protocol/identify"
54
53
ping "gx/ipfs/QmUEqyXr97aUbNmQADHYNknjwjjdVpJXEt1UZXmSG81EV4/go-libp2p/p2p/protocol/ping"
54
+ mfs "gx/ipfs/QmUbAxuGfnfiWvAcJxZqJNFZe3wPpEmuNA5YTWk96YKKcp/go-mfs"
55
55
bitswap "gx/ipfs/QmUyaGN3WPr3CTLai7DBvMikagK45V4fUi8p8cNRaJQoU1/go-bitswap"
56
56
bsnet "gx/ipfs/QmUyaGN3WPr3CTLai7DBvMikagK45V4fUi8p8cNRaJQoU1/go-bitswap/network"
57
57
connmgr "gx/ipfs/QmW9pfNup4hcWxyMxDGSe25tG9xepvLqqmQUoTDaawzTZe/go-libp2p-connmgr"
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import (
13
13
humanize "gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize"
14
14
cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid"
15
15
logging "gx/ipfs/QmRREK2CAZ5Re2Bd9zZFG6FeYDppUWt5cMgsoUEp3ktgSr/go-log"
16
- mfs "gx/ipfs/QmRkrpnhZqDxTxwGCsDbuZMr7uCFZHH6SGfrcjgEQwxF3t /go-mfs"
16
+ mfs "gx/ipfs/QmUbAxuGfnfiWvAcJxZqJNFZe3wPpEmuNA5YTWk96YKKcp /go-mfs"
17
17
)
18
18
19
19
var log = logging .Logger ("corerepo" )
Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ import (
22
22
posinfo "gx/ipfs/QmPG32VXR5jmpo9q8R9FNdR4Ae97Ky9CiZE6SctJLUB79H/go-ipfs-posinfo"
23
23
cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid"
24
24
logging "gx/ipfs/QmRREK2CAZ5Re2Bd9zZFG6FeYDppUWt5cMgsoUEp3ktgSr/go-log"
25
- mfs "gx/ipfs/QmRkrpnhZqDxTxwGCsDbuZMr7uCFZHH6SGfrcjgEQwxF3t/go-mfs"
26
25
files "gx/ipfs/QmSP88ryZkHSRn1fnngAaV2Vcn63WUJzAavnRM9CVdU1Ky/go-ipfs-cmdkit/files"
26
+ mfs "gx/ipfs/QmUbAxuGfnfiWvAcJxZqJNFZe3wPpEmuNA5YTWk96YKKcp/go-mfs"
27
27
ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format"
28
28
chunker "gx/ipfs/QmdSeG9s4EQ9TGruJJS9Us38TQDZtMmFGwzTYUDVqNTURm/go-ipfs-chunker"
29
29
bstore "gx/ipfs/QmegPGspn3RpTMQ23Fd3GVVMopo1zsEMurudbFMZ5UXBLH/go-ipfs-blockstore"
Original file line number Diff line number Diff line change @@ -21,9 +21,9 @@ import (
21
21
ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto"
22
22
peer "gx/ipfs/QmQsErDt8Qgw1XrsXf2BpEzDgGWtB1YLsTAARBup5b6B9W/go-libp2p-peer"
23
23
logging "gx/ipfs/QmRREK2CAZ5Re2Bd9zZFG6FeYDppUWt5cMgsoUEp3ktgSr/go-log"
24
- mfs "gx/ipfs/QmRkrpnhZqDxTxwGCsDbuZMr7uCFZHH6SGfrcjgEQwxF3t/go-mfs"
25
24
fuse "gx/ipfs/QmSJBsmLP1XMjv8hxYg2rUMdPDB7YUpyBo9idjrJ6Cmq6F/fuse"
26
25
fs "gx/ipfs/QmSJBsmLP1XMjv8hxYg2rUMdPDB7YUpyBo9idjrJ6Cmq6F/fuse/fs"
26
+ mfs "gx/ipfs/QmUbAxuGfnfiWvAcJxZqJNFZe3wPpEmuNA5YTWk96YKKcp/go-mfs"
27
27
)
28
28
29
29
func init () {
Original file line number Diff line number Diff line change 536
536
},
537
537
{
538
538
"author" : " hsanjuan" ,
539
- "hash" : " QmRkrpnhZqDxTxwGCsDbuZMr7uCFZHH6SGfrcjgEQwxF3t " ,
539
+ "hash" : " QmUbAxuGfnfiWvAcJxZqJNFZe3wPpEmuNA5YTWk96YKKcp " ,
540
540
"name" : " go-mfs" ,
541
- "version" : " 0.1.1 "
541
+ "version" : " 0.1.2 "
542
542
},
543
543
{
544
544
"author" : " kevina" ,
Original file line number Diff line number Diff line change @@ -202,6 +202,12 @@ test_files_api() {
202
202
test_cmp ls_l_expected ls_l_actual
203
203
'
204
204
205
+ test_expect_success " file has correct hash and size listed with -l --cid-base=base32" '
206
+ echo "file1 `cid-fmt -v 1 -b base32 %s $FILE1` 4" > ls_l_expected &&
207
+ ipfs files ls --cid-base=base32 -l /cats/file1 > ls_l_actual &&
208
+ test_cmp ls_l_expected ls_l_actual
209
+ '
210
+
205
211
test_expect_success " file shows up with the correct name" '
206
212
echo "file1" > ls_l_expected &&
207
213
ipfs files ls /cats/file1 > ls_l_actual &&
@@ -221,6 +227,19 @@ test_files_api() {
221
227
test_cmp file1stat_expect file1stat_actual
222
228
'
223
229
230
+ test_expect_success " can stat file with --cid-base=base32 $EXTRA " '
231
+ ipfs files stat --cid-base=base32 /cats/file1 > file1stat_orig
232
+ '
233
+
234
+ test_expect_success " stat output looks good with --cid-base=base32" '
235
+ grep -v CumulativeSize: file1stat_orig > file1stat_actual &&
236
+ echo `cid-fmt -v 1 -b base32 %s $FILE1` > file1stat_expect &&
237
+ echo "Size: 4" >> file1stat_expect &&
238
+ echo "ChildBlocks: 0" >> file1stat_expect &&
239
+ echo "Type: file" >> file1stat_expect &&
240
+ test_cmp file1stat_expect file1stat_actual
241
+ '
242
+
224
243
test_expect_success " can read file $EXTRA " '
225
244
ipfs files read /cats/file1 > file1out
226
245
'
You can’t perform that action at this time.
0 commit comments