diff --git a/src/backupformat/tgz.js b/src/backupformat/tgz.js index 78701de4e..e67e05bf0 100644 --- a/src/backupformat/tgz.js +++ b/src/backupformat/tgz.js @@ -24,11 +24,12 @@ function getBackupFilePath(backupConfig, remotePath) { assert.strictEqual(typeof backupConfig, 'object'); assert.strictEqual(typeof remotePath, 'string'); + const rootPath = backupConfig.rootPath; + const fileType = backupConfig.encryption ? '.tar.gz.enc' : '.tar.gz'; + // 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); }