Ensure we only add a leading / when we have a prefix

Part of #343
This commit is contained in:
Johannes Zellner
2017-07-19 14:20:35 +02:00
parent b5aed7b00a
commit 11c2cecc9e

View File

@@ -214,7 +214,7 @@ function testConfig(apiConfig, callback) {
var params = {
Bucket: apiConfig.bucket,
Key: apiConfig.prefix + '/cloudron-testfile',
Key: path.join(apiConfig.prefix, 'cloudron-testfile'),
Body: 'testcontent'
};
@@ -224,7 +224,7 @@ function testConfig(apiConfig, callback) {
var params = {
Bucket: apiConfig.bucket,
Key: apiConfig.prefix + '/cloudron-testfile'
Key: path.join(apiConfig.prefix, 'cloudron-testfile')
};
s3.deleteObject(params, function (error) {