2
1
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2023-12-13 21:00:40 +01:00

Merge pull request #3485 from jaswilli/migration

Fix naming of export file during migration
This commit is contained in:
Hannah Wolfe 2014-07-31 20:55:12 +01:00
commit a13f460acb

View file

@ -44,10 +44,12 @@ backupDatabase = function backupDatabase() {
logInfo('Creating database backup');
return dataExport().then(function (exportedData) {
// Save the exported data to the file system for download
var fileName = path.resolve(config.paths.contentPath + '/data/' + dataExport.fileName());
return dataExport.fileName().then(function (fileName) {
fileName = path.resolve(config.paths.contentPath + '/data/' + fileName);
return nodefn.call(fs.writeFile, fileName, JSON.stringify(exportedData)).then(function () {
logInfo('Database backup written to: ' + fileName);
return nodefn.call(fs.writeFile, fileName, JSON.stringify(exportedData)).then(function () {
logInfo('Database backup written to: ' + fileName);
});
});
});
};