null check fsPath on unlink file

This commit is contained in:
Henry Oswald 2016-12-19 14:48:09 +00:00
parent 9e8c27f46b
commit e0f39da616

View file

@ -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