Added logs to detect Files written with no content
This commit is contained in:
1 parent
180f1cd746
commit
bca06e177c
1 file changed
+3
@@ -64,6 +64,7 @@ exports.newFileStorage = function newFileStorage(logger) {
|
||||
}
|
||||
|
||||
logInfo('getTextFile: ' + fileLocation)
|
||||
console.log('getTextFile: ' + fileLocation)
|
||||
|
||||
let fileContent = await readFileAsync(fileLocation)
|
||||
callBackFunction(global.DEFAULT_OK_RESPONSE, fileContent.toString())
|
||||
@@ -129,6 +130,8 @@ exports.newFileStorage = function newFileStorage(logger) {
|
||||
}
|
||||
|
||||
logInfo('createTextFile: ' + fileLocation)
|
||||
console.log('createTextFile: ' + fileLocation)
|
||||
|
||||
let directoryPath = fileLocation.substring(0, fileLocation.lastIndexOf('/') + 1);
|
||||
mkDirByPathSync(directoryPath)
|
||||
await writeFileAsync(fileLocation, fileContent)
|
||||
|
||||
Reference in new issue
Block a user