mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Handle all configured paths as potentially absolute
This commit is contained in:
parent
f1b7c4f62d
commit
63b52fa1f6
5 changed files with 22 additions and 29 deletions
|
@ -619,7 +619,7 @@ module.exports.CreateAmtProvisioningServer = function (parent, config) {
|
|||
if ((domain.amtacmactivation == null) || (domain.amtacmactivation.log == null) || (typeof domain.amtacmactivation.log != 'string')) {
|
||||
if (domain.id == '') { logpath = parent.path.join(obj.parent.datapath, 'amtactivation.log'); } else { logpath = parent.path.join(obj.parent.datapath, 'amtactivation-' + domain.id + '.log'); }
|
||||
} else {
|
||||
if ((domain.amtacmactivation.log.length >= 2) && ((domain.amtacmactivation.log[0] == '/') || (domain.amtacmactivation.log[1] == ':'))) { logpath = domain.amtacmactivation.log; } else { logpath = parent.path.join(obj.parent.datapath, domain.amtacmactivation.log); }
|
||||
logpath = parent.common.joinPath(obj.parent.datapath, domain.amtacmactivation.log);
|
||||
}
|
||||
try { parent.fs.appendFileSync(logpath, JSON.stringify(x) + '\r\n'); } catch (ex) { console.log(ex); return false; }
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue