Fixed mongodump error.

This commit is contained in:
Ylian Saint-Hilaire 2021-01-09 00:40:03 -08:00
parent 2029d9d24c
commit 397fe9fb63

4
db.js
View File

@ -1393,7 +1393,11 @@ module.exports.CreateDB = function (parent, func) {
child_process.exec('"' + mongoDumpPath + '"', { cwd: backupPath }, function (error, stdout, stderr) {
try {
if ((error != null) && (error != '')) {
if (parent.platform == 'win32') {
func(1, "Unable to find mongodump.exe, MongoDB database auto-backup will not be performed.");
} else {
func(1, "Unable to find mongodump, MongoDB database auto-backup will not be performed.");
}
} else {
func();
}