diff --git a/src/backupformat/rsync.js b/src/backupformat/rsync.js index 0dafa55d3..bf400813b 100644 --- a/src/backupformat/rsync.js +++ b/src/backupformat/rsync.js @@ -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); } diff --git a/src/backupformat/tgz.js b/src/backupformat/tgz.js index 9dff4fc01..78701de4e 100644 --- a/src/backupformat/tgz.js +++ b/src/backupformat/tgz.js @@ -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);