From 049dcc2780feef058affa2c279506103d68ed6bc Mon Sep 17 00:00:00 2001 From: James Allen Date: Thu, 10 Apr 2014 12:45:31 +0100 Subject: [PATCH 1/2] Split lines on Windows line endings too --- .../app/coffee/Features/ThirdPartyDataStore/UpdateMerger.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/web/app/coffee/Features/ThirdPartyDataStore/UpdateMerger.coffee b/services/web/app/coffee/Features/ThirdPartyDataStore/UpdateMerger.coffee index b9e9ddc895..3499609835 100644 --- a/services/web/app/coffee/Features/ThirdPartyDataStore/UpdateMerger.coffee +++ b/services/web/app/coffee/Features/ThirdPartyDataStore/UpdateMerger.coffee @@ -102,7 +102,7 @@ readFileIntoTextArray = (path, callback)-> if error? logger.err path:path, "error reading file into text array" return callback(err) - lines = content.split("\n") + lines = content.split(/\r\n|\n|\r/) callback error, lines From 573c877a57ab98b19eeebf712ffa4aa8110c6529 Mon Sep 17 00:00:00 2001 From: James Allen Date: Thu, 10 Apr 2014 12:57:49 +0100 Subject: [PATCH 2/2] Remove unneeded/broken stream.resume() --- .../coffee/Features/ThirdPartyDataStore/UpdateMerger.coffee | 3 --- 1 file changed, 3 deletions(-) diff --git a/services/web/app/coffee/Features/ThirdPartyDataStore/UpdateMerger.coffee b/services/web/app/coffee/Features/ThirdPartyDataStore/UpdateMerger.coffee index 3499609835..16bc6508ad 100644 --- a/services/web/app/coffee/Features/ThirdPartyDataStore/UpdateMerger.coffee +++ b/services/web/app/coffee/Features/ThirdPartyDataStore/UpdateMerger.coffee @@ -94,9 +94,6 @@ module.exports = logger.log project_id:project_id, file_id:file_id, dumpPath:dumpPath, "tpds update write stream finished" callback null, dumpPath - stream.resume() - - readFileIntoTextArray = (path, callback)-> fs.readFile path, "utf8", (error, content = "") -> if error?