diff --git a/src/storage/caas.js b/src/storage/caas.js index c10c27f2f..21720d8f6 100644 --- a/src/storage/caas.js +++ b/src/storage/caas.js @@ -57,7 +57,7 @@ function getBackupFilePath(apiConfig, backupId) { const FILE_TYPE = apiConfig.key ? '.tar.gz.enc' : '.tar.gz'; - return path.join(apiConfig.prefix, backupId.endsWith(FILE_TYPE) ? backupId : backupId+FILE_TYPE); + return path.join(apiConfig.prefix, backupId+FILE_TYPE); } // storage api diff --git a/src/storage/filesystem.js b/src/storage/filesystem.js index cc2babf94..f3c51373d 100644 --- a/src/storage/filesystem.js +++ b/src/storage/filesystem.js @@ -34,7 +34,7 @@ function getBackupFilePath(apiConfig, backupId) { const FILE_TYPE = apiConfig.key ? '.tar.gz.enc' : '.tar.gz'; - return path.join(apiConfig.backupFolder, backupId.endsWith(FILE_TYPE) ? backupId : backupId+FILE_TYPE); + return path.join(apiConfig.backupFolder, backupId+FILE_TYPE); } // storage api diff --git a/src/storage/s3.js b/src/storage/s3.js index e90362280..28c7db586 100644 --- a/src/storage/s3.js +++ b/src/storage/s3.js @@ -63,7 +63,7 @@ function getBackupFilePath(apiConfig, backupId) { const FILE_TYPE = apiConfig.key ? '.tar.gz.enc' : '.tar.gz'; - return path.join(apiConfig.prefix, backupId.endsWith(FILE_TYPE) ? backupId : backupId+FILE_TYPE); + return path.join(apiConfig.prefix, backupId+FILE_TYPE); } // storage api