mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-04-01 10:13:38 -04:00
Fix autoback exception, #3270
This commit is contained in:
parent
4eb40c36e0
commit
dd46cbaede
@ -1748,7 +1748,7 @@ function CreateMeshCentralServer(config, args) {
|
|||||||
else if (obj.config.settings.autobackup === false) { delete obj.config.settings.autobackup; }
|
else if (obj.config.settings.autobackup === false) { delete obj.config.settings.autobackup; }
|
||||||
|
|
||||||
// Check that autobackup path is not within the "meshcentral-data" folder.
|
// 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);
|
addServerWarning("Backup path can't be set within meshcentral-data folder, backup settings ignored.", 21);
|
||||||
delete obj.config.settings.autobackup;
|
delete obj.config.settings.autobackup;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user