diff --git a/src/storage/s3.js b/src/storage/s3.js index 4293b5c0d..86aaeeda4 100644 --- a/src/storage/s3.js +++ b/src/storage/s3.js @@ -51,13 +51,15 @@ function getAllPaged(backupConfig, page, perPage, callback) { if (error) return callback(error); var results = data.Contents.map(function (backup) { + var key = backup.Key.slice(backupConfig.prefix.length + 1); + // This depends on the backups.js format of backup names :-( - var version = backup.Key.slice(backup.Key.lastIndexOf('-') + 2, -7); + var version = key.slice(key.lastIndexOf('-') + 2, -7); return { creationTime: backup.LastModified, boxVersion: version, - restoreKey: backup.Key, + restoreKey: key, dependsOn: [] // FIXME we have no information here }; });