diff --git a/Projects/Superalgos/TS/Task-Modules/FileStorage.js b/Projects/Superalgos/TS/Task-Modules/FileStorage.js index b7096bb11..737f7b61d 100644 --- a/Projects/Superalgos/TS/Task-Modules/FileStorage.js +++ b/Projects/Superalgos/TS/Task-Modules/FileStorage.js @@ -87,7 +87,7 @@ exports.newFileStorage = function newFileStorage(processIndex, host, port) { logger.write(MODULE_NAME, '[INFO] FileStorage -> getTextFile -> fileLocation: ' + fileLocation) /* Here we actually reaad the file. */ - if (host === undefined || host === 'localhost' || host === ip.address()) { + if (host === undefined || host === 'localhost' || host === ip.address() || host === '127.0.0.1') { /* We read the file from the local file system. */ const fs = require('fs') fs.readFile(fileLocation, onFileRead) @@ -159,7 +159,7 @@ exports.newFileStorage = function newFileStorage(processIndex, host, port) { if (canUsePrevious === true) { logger.write(MODULE_NAME, '[WARN] FileStorage -> getTextFile -> onFileRead -> Could read the file, but could not parse it as it is not a valid JSON. Will try to read the PREVIOUS version instead. -> file = ' + fileLocation) - if (host === undefined || host === 'localhost' || host === ip.address()) { + if (host === undefined || host === 'localhost' || host === ip.address() || host === '127.0.0.1') { /* We read the file from the local file system. */ const fs = require('fs') fs.readFile(fileLocation + '.Previous.json', onPreviousFileRead)