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

Commit

Permalink
fix: always use files.cat
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddias committed Sep 13, 2016
1 parent 4e61958 commit 5b8da13
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"detect-node": "^2.0.3",
"glob": "^7.0.6",
"hapi": "^15.0.3",
"ipfs-api": "^8.0.3",
"ipfs-api": "^8.0.4",
"ipfs-bitswap": "^0.7.0",
"ipfs-block": "^0.3.0",
"ipfs-block-service": "^0.5.0",
Expand Down Expand Up @@ -132,4 +132,4 @@
"nginnever <ginneversource@gmail.com>",
"npmcdn-to-unpkg-bot <npmcdn-to-unpkg-bot@users.noreply.github.com>"
]
}
}
12 changes: 9 additions & 3 deletions src/cli/commands/files/add.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,17 @@ module.exports = {
const index = inPath.lastIndexOf('/') + 1

utils.getIPFS((err, ipfs) => {
if (err) throw err
if (err) {
throw err
}

glob(path.join(inPath, '/**/*'), (err, list) => {
if (err) throw err
if (list.length === 0) list = [inPath]
if (err) {
throw err
}
if (list.length === 0) {
list = [inPath]
}

pull(
zip(
Expand Down
4 changes: 0 additions & 4 deletions src/cli/commands/files/cat.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ module.exports = {
throw err
}

if (utils.isDaemonOn()) {
return ipfs.cat(path, onFile)
}

ipfs.files.cat(path, onFile)
})
}
Expand Down

0 comments on commit 5b8da13

Please sign in to comment.