Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 5c7b448

Browse files
feat(init): add empty unixfs dir to match go-ipfs
1 parent 0835f08 commit 5c7b448

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/core/components/init.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ module.exports = function init (self) {
5050
self._repo.version.set(VERSION, cb)
5151
},
5252
(cb) => self._repo.config.set(config, cb),
53-
(cb) => {
53+
// add empty unixfs dir object (go-ipfs assumes this exists)
54+
(cb) => self.object.new('unixfs-dir', cb),
55+
(node, cb) => {
5456
if (typeof addDefaultAssets === 'function' && !opts.emptyRepo) {
5557
return addDefaultAssets(self, opts.log, cb)
5658
}

0 commit comments

Comments
 (0)