More robust node filename generation.
Do not place "undefined" in parts of filenames even if node files are missing entries like the token.
This commit is contained in:
parent
6c35daec45
commit
b4dc9e37b2
|
@ -121,10 +121,10 @@ angular.module('ffffng')
|
||||||
function toNodeFilename(token, node, nodeSecrets) {
|
function toNodeFilename(token, node, nodeSecrets) {
|
||||||
return config.server.peersPath + '/' +
|
return config.server.peersPath + '/' +
|
||||||
(
|
(
|
||||||
node.hostname + '@' +
|
(node.hostname || '') + '@' +
|
||||||
node.mac + '@' +
|
(node.mac || '') + '@' +
|
||||||
(node.key || '') + '@' +
|
(node.key || '') + '@' +
|
||||||
token + '@' +
|
(token || '') + '@' +
|
||||||
(nodeSecrets.monitoringToken || '')
|
(nodeSecrets.monitoringToken || '')
|
||||||
).toLowerCase();
|
).toLowerCase();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue