execute success callback when filesystem copyfile completed

This commit is contained in:
Brian Gough 2014-12-22 11:27:00 +00:00
parent 72ebaea5e2
commit dad209262f

View file

@ -53,6 +53,8 @@ module.exports =
targetStream.on 'error', (err) ->
logger.err err:err, location:location, key:filteredToName, "Error writing to file"
callback err
targetStream.on 'finish', () ->
callback null
sourceStream.pipe targetStream
deleteFile: (location, name, callback)->