Skip to content

Commit

Permalink
Fix for Ylianst#2801.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ylianst committed Jun 22, 2021
1 parent 6a37d04 commit f48536c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions db.js
Original file line number Diff line number Diff line change
Expand Up @@ -1563,8 +1563,8 @@ module.exports.CreateDB = function (parent, func) {

var dbname = 'meshcentral';
if (parent.args.mongodbname) { dbname = parent.args.mongodbname; }
else if (parent.args.mariadb.database) { dbname = parent.args.mariadb.database; }
else if (parent.args.mysql.database) { dbname = parent.args.mysql.database; }
else if ((typeof parent.args.mariadb == 'object') && (typeof parent.args.mariadb.database == 'string')) { dbname = parent.args.mariadb.database; }
else if ((typeof parent.args.mysql == 'object') && (typeof parent.args.mysql.database == 'string')) { dbname = parent.args.mysql.database; }

const currentDate = new Date();
const fileSuffix = currentDate.getFullYear() + '-' + padNumber(currentDate.getMonth() + 1, 2) + '-' + padNumber(currentDate.getDate(), 2) + '-' + padNumber(currentDate.getHours(), 2) + '-' + padNumber(currentDate.getMinutes(), 2);
Expand Down

0 comments on commit f48536c

Please sign in to comment.