From dd46cbaede21aea2d51487b6eb2438d099fb5070 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Wed, 10 Nov 2021 22:55:10 -0800 Subject: [PATCH] Fix autoback exception, #3270 --- meshcentral.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshcentral.js b/meshcentral.js index 0f74bac1..84ac84a4 100644 --- a/meshcentral.js +++ b/meshcentral.js @@ -1748,7 +1748,7 @@ function CreateMeshCentralServer(config, args) { else if (obj.config.settings.autobackup === false) { delete obj.config.settings.autobackup; } // Check that autobackup path is not within the "meshcentral-data" folder. - if ((typeof obj.config.settings.autobackup.backuppath == 'string') && (obj.path.normalize(obj.config.settings.autobackup.backuppath).startsWith(obj.path.normalize(obj.datapath)))) { + if ((typeof obj.config.settings.autobackup == 'object') && (typeof obj.config.settings.autobackup.backuppath == 'string') && (obj.path.normalize(obj.config.settings.autobackup.backuppath).startsWith(obj.path.normalize(obj.datapath)))) { addServerWarning("Backup path can't be set within meshcentral-data folder, backup settings ignored.", 21); delete obj.config.settings.autobackup; }