From 4d7ed1cb17cc7f587c45eedf9a91d8eb62e6302a Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Mon, 21 Mar 2016 16:00:12 +0000 Subject: [PATCH] improved logging from unzip command --- .../web/app/coffee/Features/Uploads/ArchiveManager.coffee | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/services/web/app/coffee/Features/Uploads/ArchiveManager.coffee b/services/web/app/coffee/Features/Uploads/ArchiveManager.coffee index 41d041109d..5185c5d49c 100644 --- a/services/web/app/coffee/Features/Uploads/ArchiveManager.coffee +++ b/services/web/app/coffee/Features/Uploads/ArchiveManager.coffee @@ -39,11 +39,11 @@ module.exports = ArchiveManager = lastLine = lines[lines.length - 2]?.trim() totalSizeInBytes = lastLine?.split(" ")?[0] - totalSizeInBytes = parseInt(totalSizeInBytes) + totalSizeInBytesAsInt = parseInt(totalSizeInBytes) - if !totalSizeInBytes? or isNaN(totalSizeInBytes) - logger.err source:source, "error getting bytes of zip" - return callback(new Error("something went wrong")) + if !totalSizeInBytesAsInt? or isNaN(totalSizeInBytesAsInt) + logger.err source:source, totalSizeInBytes:totalSizeInBytes, totalSizeInBytesAsInt:totalSizeInBytesAsInt, lastLine:lastLine, "error getting bytes of zip" + return callback(new Error("error getting bytes of zip")) isTooLarge = totalSizeInBytes > (ONE_MEG * 300)