From 397fe9fb630feca8b7baa13425a01ac74a36b4b0 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Sat, 9 Jan 2021 00:40:03 -0800 Subject: [PATCH] Fixed mongodump error. --- db.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/db.js b/db.js index fe440403..9ea32501 100644 --- a/db.js +++ b/db.js @@ -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 != '')) { - func(1, "Unable to find mongodump.exe, MongoDB database auto-backup will not be performed."); + 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(); }