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

Commit 1b98fa1

Browse files
richardschneiderdaviddias
authored andcommitted
fix: cli files on Windows (#1159)
* fix: files add -w * fix: files get
1 parent 9e61377 commit 1b98fa1

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/cli/commands/files/add.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ function addPipeline (index, addStream, list, argv) {
8181
originalPath: file.path
8282
})),
8383
pull.map((file) => ({
84-
path: wrapWithDirectory ? path.join(WRAPPER, file.path) : file.path,
84+
path: wrapWithDirectory ? WRAPPER + file.path : file.path,
8585
content: fs.createReadStream(file.originalPath)
8686
})),
8787
addStream,

src/cli/commands/files/get.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,8 @@ const print = require('../../utils').print
99

1010
function checkArgs (hash, outPath) {
1111
// format the output directory
12-
if (!outPath.endsWith('/')) {
13-
outPath += '/'
14-
}
15-
16-
if (!outPath.startsWith('/')) {
17-
outPath = path.join('/', outPath)
12+
if (!outPath.endsWith(path.sep)) {
13+
outPath += path.sep
1814
}
1915

2016
return outPath

0 commit comments

Comments
 (0)