From dad209262f15115581e1b47b03a7f795ed58ac2b Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Mon, 22 Dec 2014 11:27:00 +0000 Subject: [PATCH] execute success callback when filesystem copyfile completed --- services/filestore/app/coffee/FSPersistorManager.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/filestore/app/coffee/FSPersistorManager.coffee b/services/filestore/app/coffee/FSPersistorManager.coffee index d00b112c27..4d6d79b1a7 100644 --- a/services/filestore/app/coffee/FSPersistorManager.coffee +++ b/services/filestore/app/coffee/FSPersistorManager.coffee @@ -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)->