From f7b42bc398f2e8d36c275235937c7f3b16d01ca5 Mon Sep 17 00:00:00 2001 From: Richard Schneider Date: Wed, 20 Dec 2017 11:01:38 +1300 Subject: [PATCH 1/2] fix: files add -w --- src/cli/commands/files/add.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli/commands/files/add.js b/src/cli/commands/files/add.js index a41822b8db..5886ac2365 100644 --- a/src/cli/commands/files/add.js +++ b/src/cli/commands/files/add.js @@ -81,7 +81,7 @@ function addPipeline (index, addStream, list, argv) { originalPath: file.path })), pull.map((file) => ({ - path: wrapWithDirectory ? path.join(WRAPPER, file.path) : file.path, + path: wrapWithDirectory ? WRAPPER + file.path : file.path, content: fs.createReadStream(file.originalPath) })), addStream, From 7ff790ffcd68cbe8158ca37c7263a4e27adfe405 Mon Sep 17 00:00:00 2001 From: Richard Schneider Date: Wed, 20 Dec 2017 11:38:36 +1300 Subject: [PATCH 2/2] fix: files get --- src/cli/commands/files/get.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/cli/commands/files/get.js b/src/cli/commands/files/get.js index 5c3a82563e..85ee810671 100644 --- a/src/cli/commands/files/get.js +++ b/src/cli/commands/files/get.js @@ -9,12 +9,8 @@ const print = require('../../utils').print function checkArgs (hash, outPath) { // format the output directory - if (!outPath.endsWith('/')) { - outPath += '/' - } - - if (!outPath.startsWith('/')) { - outPath = path.join('/', outPath) + if (!outPath.endsWith(path.sep)) { + outPath += path.sep } return outPath