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

Commit 5b8da13

Browse files
committed
fix: always use files.cat
1 parent 4e61958 commit 5b8da13

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"detect-node": "^2.0.3",
6969
"glob": "^7.0.6",
7070
"hapi": "^15.0.3",
71-
"ipfs-api": "^8.0.3",
71+
"ipfs-api": "^8.0.4",
7272
"ipfs-bitswap": "^0.7.0",
7373
"ipfs-block": "^0.3.0",
7474
"ipfs-block-service": "^0.5.0",
@@ -132,4 +132,4 @@
132132
"nginnever <[email protected]>",
133133
"npmcdn-to-unpkg-bot <[email protected]>"
134134
]
135-
}
135+
}

src/cli/commands/files/add.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,17 @@ module.exports = {
5555
const index = inPath.lastIndexOf('/') + 1
5656

5757
utils.getIPFS((err, ipfs) => {
58-
if (err) throw err
58+
if (err) {
59+
throw err
60+
}
5961

6062
glob(path.join(inPath, '/**/*'), (err, list) => {
61-
if (err) throw err
62-
if (list.length === 0) list = [inPath]
63+
if (err) {
64+
throw err
65+
}
66+
if (list.length === 0) {
67+
list = [inPath]
68+
}
6369

6470
pull(
6571
zip(

src/cli/commands/files/cat.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ module.exports = {
1919
throw err
2020
}
2121

22-
if (utils.isDaemonOn()) {
23-
return ipfs.cat(path, onFile)
24-
}
25-
2622
ipfs.files.cat(path, onFile)
2723
})
2824
}

0 commit comments

Comments
 (0)