rsync: encrypted upload (fs backend)

Part of #440
This commit is contained in:
Girish Ramakrishnan
2018-07-27 06:55:54 -07:00
parent f97f528f05
commit b3c8767d79
2 changed files with 45 additions and 4 deletions
-2
View File
@@ -311,8 +311,6 @@ function setBackupConfig(backupConfig, callback) {
assert.strictEqual(typeof backupConfig, 'object');
assert.strictEqual(typeof callback, 'function');
if (backupConfig.key && backupConfig.format !== 'tgz') return callback(new SettingsError(SettingsError.BAD_FIELD, 'format does not support encryption'));
backups.testConfig(backupConfig, function (error) {
if (error && error.reason === BackupsError.BAD_FIELD) return callback(new SettingsError(SettingsError.BAD_FIELD, error.message));
if (error && error.reason === BackupsError.EXTERNAL_ERROR) return callback(new SettingsError(SettingsError.EXTERNAL_ERROR, error.message));