This repository was archived by the owner on Aug 12, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +2
-11
lines changed Expand file tree Collapse file tree 3 files changed +2
-11
lines changed Original file line number Diff line number Diff line change 2
2
3
3
const pull = require ( 'pull-stream' )
4
4
const CID = require ( 'cids' )
5
- const v = require ( 'is-ipfs' )
6
5
const pullDefer = require ( 'pull-defer' )
7
6
8
7
const resolve = require ( './resolve' ) . resolve
@@ -16,7 +15,7 @@ function pathBaseAndRest (path) {
16
15
pathBase = ( new CID ( path ) ) . toBaseEncodedString ( )
17
16
}
18
17
19
- if ( typeof path === 'string' ) {
18
+ if ( typeof path === 'string' ) {
20
19
if ( path . indexOf ( '/ipfs/' ) === 0 ) {
21
20
path = path . substring ( 6 )
22
21
}
Original file line number Diff line number Diff line change @@ -337,15 +337,13 @@ module.exports = (repo) => {
337
337
338
338
it ( 'exports a big dir with subpath' , ( done ) => {
339
339
const exportHash = mh . toB58String ( rootHash ) + '/big/big/2000'
340
- const entries = { }
341
340
pull (
342
341
exporter ( exportHash , ipldResolver ) ,
343
342
pull . collect ( collected )
344
343
)
345
344
346
345
function collected ( err , nodes ) {
347
346
expect ( err ) . to . not . exist ( )
348
- const paths = Object . keys ( entries ) . sort ( )
349
347
expect ( nodes . length ) . to . equal ( 4 )
350
348
expect ( nodes . map ( ( node ) => node . path ) ) . to . deep . equal ( [
351
349
'QmTm3ZdKxyDLvcEePEvGfB2QReXsiAF7f39yjRcWwWrA6d' ,
@@ -363,7 +361,6 @@ module.exports = (repo) => {
363
361
)
364
362
}
365
363
} )
366
-
367
364
} )
368
365
} )
369
366
}
Original file line number Diff line number Diff line change @@ -6,12 +6,8 @@ chai.use(require('dirty-chai'))
6
6
const expect = chai . expect
7
7
const BlockService = require ( 'ipfs-block-service' )
8
8
const IPLDResolver = require ( 'ipld-resolver' )
9
- const UnixFS = require ( 'ipfs-unixfs' )
10
- const bs58 = require ( 'bs58' )
11
- const pull = require ( 'pull-stream' )
12
- const zip = require ( 'pull-zip' )
13
- const CID = require ( 'cids' )
14
9
const loadFixture = require ( 'aegir/fixtures' )
10
+ const pull = require ( 'pull-stream' )
15
11
const Buffer = require ( 'safe-buffer' ) . Buffer
16
12
17
13
const unixFSEngine = require ( './../src' )
@@ -28,7 +24,6 @@ module.exports = (repo) => {
28
24
ipldResolver = new IPLDResolver ( bs )
29
25
} )
30
26
31
-
32
27
it ( 'export a file 2 levels down' , ( done ) => {
33
28
const hash = 'QmWChcSFMNcFkfeJtNd8Yru1rE6PhtCRfewi1tMwjkwKjN/level-1/200Bytes.txt'
34
29
You can’t perform that action at this time.
0 commit comments