Skip to content

Commit 8d39b3c

Browse files
committed
doen't use path.join for urls
* the path module is for filesystem path. It is plaform agnostic and will add backslashs on windows. That is not the expected behavior.
1 parent 84567df commit 8d39b3c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/s3.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module.exports = CoreObject.extend({
3737
var prefix = options.prefix;
3838
var manifestPath = options.manifestPath;
3939
if (manifestPath) {
40-
var key = path.join(prefix, manifestPath);
40+
var key = prefix === '' ? manifestPath : [prefix, manifestPath].join('/');
4141
plugin.log('Downloading manifest for differential deploy from `' + key + '`...', { verbose: true });
4242
return new Promise(function(resolve, reject){
4343
var params = { Bucket: options.bucket, Key: key};
@@ -81,7 +81,7 @@ module.exports = CoreObject.extend({
8181
var data = fs.readFileSync(basePath);
8282
var contentType = mime.lookup(basePath);
8383
var encoding = mime.charsets.lookup(contentType);
84-
var key = path.join(prefix, filePath);
84+
var key = prefix === '' ? filePath : [prefix, filePath].join('/');
8585
var isGzipped = gzippedFilePaths.indexOf(filePath) !== -1;
8686

8787
if (encoding) {

0 commit comments

Comments
 (0)