-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Labels
P2Medium: Good to have, but can wait until someone steps upMedium: Good to have, but can wait until someone steps upexp/noviceSomeone with a little familiarity can pick upSomeone with a little familiarity can pick uphelp wantedSeeking public contribution on this issueSeeking public contribution on this issuekind/discussionTopical discussion; usually not changes to codebaseTopical discussion; usually not changes to codebasetopic/docsDocumentationDocumentation
Description
When using a wrapWithDirectory: false
, nothing will be yielded from the unixfs importer when providing an empty import candidate. However, when wrapWithDirectory: true
the empty directory is returned.
Is this the expected behaviour?
import normalizeAddInput from 'ipfs-core-utils/src/files/normalise-input/index.js'
import { importer } from 'ipfs-unixfs-importer'
const input = []
const rootEntry = await last(pipe(
normalizeAddInput(input),
(source: any) => importer(source, blockstore, {
cidVersion: 1,
chunker: 'fixed',
maxChunkSize: 262144,
hasher: sha256,
rawLeaves: true,
wrapWithDirectory: true
})
))
Metadata
Metadata
Assignees
Labels
P2Medium: Good to have, but can wait until someone steps upMedium: Good to have, but can wait until someone steps upexp/noviceSomeone with a little familiarity can pick upSomeone with a little familiarity can pick uphelp wantedSeeking public contribution on this issueSeeking public contribution on this issuekind/discussionTopical discussion; usually not changes to codebaseTopical discussion; usually not changes to codebasetopic/docsDocumentationDocumentation