From e0f39da6161e087d85244b6e98a2ce687976dce6 Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Mon, 19 Dec 2016 14:48:09 +0000 Subject: [PATCH] null check fsPath on unlink file --- services/filestore/app/coffee/LocalFileWriter.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/filestore/app/coffee/LocalFileWriter.coffee b/services/filestore/app/coffee/LocalFileWriter.coffee index 2ecb3885df..47b2b91e77 100644 --- a/services/filestore/app/coffee/LocalFileWriter.coffee +++ b/services/filestore/app/coffee/LocalFileWriter.coffee @@ -27,6 +27,8 @@ module.exports = stream.pipe writeStream deleteFile: (fsPath, callback)-> + if !fsPath? or fsPath == "" + return callback() logger.log fsPath:fsPath, "removing local temp file" fs.unlink fsPath, callback