Fixed mongodump error.
Ylian Saint-Hilaire committed
Jan 9, 2021 at 00:40 UTC
397fe9fb630feca8b7baa13425a01ac74a36b4b0
1 file changed
+5
-1
db.js
+5
-1
@@ -1393,7 +1393,11 @@ module.exports.CreateDB = function (parent, func) {
1393
child_process.exec('"' + mongoDumpPath + '"', { cwd: backupPath }, function (error, stdout, stderr) {
1394
try {
1395
if ((error != null) && (error != '')) {
1396
- func(1, "Unable to find mongodump.exe, MongoDB database auto-backup will not be performed.");
1396
+ if (parent.platform == 'win32') {
1397
+ func(1, "Unable to find mongodump.exe, MongoDB database auto-backup will not be performed.");
1398
+ } else {
1399
+ func(1, "Unable to find mongodump, MongoDB database auto-backup will not be performed.");
1400
+ }
1401
} else {
1402
func();
1403
}