mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Fix naming of export file during migration
No Issue - The method that generates a filename for the export during a migration returns a promise, not the filename directly, so the export file was being named [object Object].
This commit is contained in:
parent
b7bfc35079
commit
8936b82014
1 changed files with 5 additions and 3 deletions
|
@ -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);
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue