Do not encrypt empty path
This commit is contained in:
+2
-1
@@ -325,7 +325,8 @@ function sync(backupConfig, backupId, dataDir, callback) {
|
||||
|
||||
syncer.sync(dataDir, function processTask(task, iteratorCallback) {
|
||||
debug('sync: processing task: %j', task);
|
||||
const destPath = backupConfig.key ? encryptFilePath(task.path, backupConfig.key) : task.path;
|
||||
// the empty task.path is special to signify the directory
|
||||
const destPath = task.path && backupConfig.key ? encryptFilePath(task.path, backupConfig.key) : task.path;
|
||||
const backupFilePath = path.join(getBackupFilePath(backupConfig, backupId, backupConfig.format), destPath);
|
||||
|
||||
if (task.operation === 'removedir') {
|
||||
|
||||
+1
-1
@@ -420,7 +420,7 @@ function removeDir(apiConfig, pathPrefix) {
|
||||
}
|
||||
};
|
||||
|
||||
events.emit('progress', `Removing ${objects.length} files from ${objects[0].fullPath} to ${objects[objects.length-1].Key}`);
|
||||
events.emit('progress', `Removing ${objects.length} files from ${objects[0].fullPath} to ${objects[objects.length-1].fullPath}`);
|
||||
|
||||
// deleteObjects does not return error if key is not found
|
||||
s3.deleteObjects(deleteParams, function (error /*, deleteData */) {
|
||||
|
||||
Reference in New Issue
Block a user