Noop provider does not have a rootPath set
This commit is contained in:
@@ -31,6 +31,9 @@ function getBackupFilePath(backupConfig, remotePath) {
|
||||
assert.strictEqual(typeof backupConfig, 'object');
|
||||
assert.strictEqual(typeof remotePath, 'string');
|
||||
|
||||
// we don't have a rootPath for noop
|
||||
if (backupConfig.provider === 'noop') return remotePath;
|
||||
|
||||
return path.join(backupConfig.rootPath, remotePath);
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,9 @@ function getBackupFilePath(backupConfig, remotePath) {
|
||||
assert.strictEqual(typeof backupConfig, 'object');
|
||||
assert.strictEqual(typeof remotePath, 'string');
|
||||
|
||||
// we don't have a rootPath for noop
|
||||
if (backupConfig.provider === 'noop') return remotePath + fileType;
|
||||
|
||||
const rootPath = backupConfig.rootPath;
|
||||
const fileType = backupConfig.encryption ? '.tar.gz.enc' : '.tar.gz';
|
||||
return path.join(rootPath, remotePath + fileType);
|
||||
|
||||
Reference in New Issue
Block a user