Handle potential error before calling LocalFileWriter.writeStream.

This commit is contained in:
Shane Kilkelly 2015-09-10 09:12:49 +01:00
parent a6fff2d4e4
commit fcfc595c35

View file

@ -81,4 +81,6 @@ module.exports =
_writeS3FileToDisk: (bucket, key, opts, callback)->
PersistorManager.getFileStream bucket, key, opts, (err, fileStream)->
if err?
return callback(err)
LocalFileWriter.writeStream fileStream, key, callback