Skip to content

Commit

Permalink
Merge pull request #1526 from OriginTrail/hotfix/migrations-directory…
Browse files Browse the repository at this point in the history
…-read

Fix how migrations directory is read during backup
  • Loading branch information
djordjekovac authored Apr 23, 2021
2 parents 4df14d2 + 82691af commit b897bb8
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions scripts/backup.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,11 @@ function getDataFileNames() {
}

function getMigrationFileNames() {
const migrationFileNames = [];
const directoryPath = path.join(config.appDataPath, 'migrations');
if (fs.existsSync(directoryPath)) {
fs.readdir(directoryPath, (err, files) => {
files.forEach((file) => {
migrationFileNames.push(file);
});
});
return fs.readdirSync(directoryPath);
}
return migrationFileNames;
return [];
}

function moveFileFromNodeToBackup(fileName, nodeDir, backupDir, showErrors = true) {
Expand Down

0 comments on commit b897bb8

Please sign in to comment.