Skip to content

Commit

Permalink
fix: add by path (#923)
Browse files Browse the repository at this point in the history
  • Loading branch information
fsdiogo authored and olizilla committed Jan 7, 2019
1 parent e06d340 commit 040891f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/bundles/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,8 @@ export default (opts = {}) => {
doFilesAddPath: make(actions.ADD_BY_PATH, (ipfs, root, src) => {
const name = src.split('/').pop()
const dst = join(root, name)
return ipfs.files.cp([src, dst])
const srcPath = src.startsWith('/') ? src : `/ipfs/${name}`
return ipfs.files.cp([srcPath, dst])
}),

doFilesDownloadLink: make(actions.DOWNLOAD_LINK, async (ipfs, files, id, { store }) => {
Expand Down

0 comments on commit 040891f

Please sign in to comment.