Syntax error fix.

Ylian Saint-Hilaire committed Nov 15, 2020 at 00:33 UTC ad5777e4b8c1940a991124eca3bfc4fde99ebecf
1 file changed +4 -4
webserver.js
+4 -4
@@ -3235,14 +3235,14 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
3235
3236 // Send the agent commands to perform the batch upload operation
3237 for (var f in cmd.files) {
3238 - if ((agentPath != null) && (cmd.files[f].name != null) {
3239 - try {
3238 + try {
3239 + if ((agentPath != null) && (cmd.files[f].name != null)) {
3240 const acmd = { action: 'wget', overwrite: cmd.overwrite, createFolder: cmd.createFolder, urlpath: '/agentdownload.ashx?c=' + obj.parent.encodeCookie({ a: 'tmpdl', d: cmd.domain.id, nid: node._id, f: cmd.files[f].target }, obj.parent.loginCookieEncryptionKey), path: obj.path.join(agentPath, cmd.files[f].name), folder: agentPath, servertlshash: tlsCertHash };
3241 var agent = obj.wsagents[node._id];
3242 if (agent != null) { try { agent.send(JSON.stringify(acmd)); } catch (ex) { } }
3243 // TODO: Add support for peer servers.
3244 - } catch (ex) { }
3245 - }
3244 + }
3245 + } catch (ex) { }
3246 }
3247 });
3248 }