From 51d73ff278f12e1e4b99661fc42637dc9eb79aed Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Mon, 12 Aug 2019 14:04:37 +0200 Subject: [PATCH] Bots from its own place --- Integrations/FileStorage.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Integrations/FileStorage.js b/Integrations/FileStorage.js index 539cc3a92..68014bd70 100644 --- a/Integrations/FileStorage.js +++ b/Integrations/FileStorage.js @@ -51,8 +51,15 @@ exports.newFileStorage = function newFileStorage() { let host = await getDevTeamHost(container) if (host.url.indexOf('localhost') !== -1) { - let fileLocation = process.env.STORAGE_PATH + '/' + container + '/' + filePath + let fileLocation + + if (filePath.indexOf("/bots/") > 0) { + fileLocation = process.env.BOTS_PATH + '/' + container + '/' + filePath + } else { + fileLocation = process.env.STORAGE_PATH + '/' + container + '/' + filePath + } + logInfo('getTextFile: ' + fileLocation) let fileContent = await readFileAsync(fileLocation)