Skip to content

Commit

Permalink
doen't use path.join for urls
Browse files Browse the repository at this point in the history
 * the path module is for filesystem path. It is plaform agnostic
   and will add backslashs on windows. That is not the expected
   behavior.
  • Loading branch information
flecno committed Oct 25, 2015
1 parent 84567df commit 2e38c7d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/s3.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ module.exports = CoreObject.extend({
var prefix = options.prefix;
var manifestPath = options.manifestPath;
if (manifestPath) {
var key = path.join(prefix, manifestPath);
var key = [prefix, manifestPath].join('/');
plugin.log('Downloading manifest for differential deploy from `' + key + '`...', { verbose: true });
return new Promise(function(resolve, reject){
var params = { Bucket: options.bucket, Key: key};
Expand Down Expand Up @@ -81,7 +81,7 @@ module.exports = CoreObject.extend({
var data = fs.readFileSync(basePath);
var contentType = mime.lookup(basePath);
var encoding = mime.charsets.lookup(contentType);
var key = path.join(prefix, filePath);
var key = [prefix, filePath].join('/');
var isGzipped = gzippedFilePaths.indexOf(filePath) !== -1;

if (encoding) {
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/index-nodetest.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ describe('s3 plugin', function() {
name: 's3'
});

context.gzippedFiles = ['app.css'];
context.gzippedFiles = ['/app.css'];
var assertionCount = 0;
context.uploadClient = null;
context.s3Client = {
Expand Down

0 comments on commit 2e38c7d

Please sign in to comment.