This repository was archived by the owner on Aug 12, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -240,13 +240,13 @@ function Importer (dagService, options) {
240
240
241
241
let pendingWrites = 0
242
242
243
- function traverse ( tree , base , done ) {
243
+ function traverse ( tree , path , done ) {
244
244
const keys = Object . keys ( tree )
245
245
let tmpTree = tree
246
246
keys . map ( ( key ) => {
247
247
if ( typeof tmpTree [ key ] === 'object' &&
248
248
! Buffer . isBuffer ( tmpTree [ key ] ) ) {
249
- tmpTree [ key ] = traverse . call ( this , tmpTree [ key ] , base ? base + '/' + key : key , done )
249
+ tmpTree [ key ] = traverse . call ( this , tmpTree [ key ] , path ? path + '/' + key : key , done )
250
250
}
251
251
} )
252
252
@@ -272,9 +272,9 @@ function Importer (dagService, options) {
272
272
pendingWrites --
273
273
if ( err ) {
274
274
this . push ( { error : 'failed to store dirNode' } )
275
- } else if ( base ) {
275
+ } else if ( path ) {
276
276
const el = {
277
- path : base ,
277
+ path : path ,
278
278
multihash : n . multihash ( ) ,
279
279
yes : 'no' ,
280
280
size : n . size ( )
@@ -287,7 +287,7 @@ function Importer (dagService, options) {
287
287
}
288
288
} )
289
289
290
- if ( ! base ) {
290
+ if ( ! path ) {
291
291
return
292
292
}
293
293
You can’t perform that action at this time.
0 commit comments