From cbe8ce0c198f96118262f6504b9b88442b04532f Mon Sep 17 00:00:00 2001 From: David Rowe Date: Thu, 12 Jan 2017 21:33:32 +1300 Subject: [PATCH] Improve handling of zip file generation failing --- scripts/system/html/js/marketplacesInject.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/system/html/js/marketplacesInject.js b/scripts/system/html/js/marketplacesInject.js index d70575184c..df6cd137ea 100644 --- a/scripts/system/html/js/marketplacesInject.js +++ b/scripts/system/html/js/marketplacesInject.js @@ -180,6 +180,9 @@ // Extract zip file URL. if (data.hasOwnProperty("files") && data.files.length > 0) { zipFileURL = data.files[0].url; + if (zipFileURL.slice(-4) !== ".zip") { + console.log(JSON.stringify(data)); // Data for debugging. + } } } @@ -197,9 +200,9 @@ return; } - if (zipFileURL === "") { - statusMessage = "Download file URL not provided"; - console.log("ERROR: Clara.io FBX: " + statusMessage); + if (zipFileURL.slice(-4) !== ".zip") { + statusMessage = "Error creating zip file for download"; + console.log("ERROR: Clara.io FBX: " + statusMessage + ": " + zipFileURL); EventBridge.emitWebEvent(CLARA_IO_STATUS + " " + statusMessage); return; }