Updated Branches:
  refs/heads/2.6.x 37751cffd -> 2dbd98f4e

[CB-2832] Fixed zipping script to ensure all items are copied


Project: http://git-wip-us.apache.org/repos/asf/cordova-wp7/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-wp7/commit/f658c747
Tree: http://git-wip-us.apache.org/repos/asf/cordova-wp7/tree/f658c747
Diff: http://git-wip-us.apache.org/repos/asf/cordova-wp7/diff/f658c747

Branch: refs/heads/2.6.x
Commit: f658c7475aa172b6658359cf9c6bbefb34505144
Parents: 37751cf
Author: Benn Mapes <[email protected]>
Authored: Mon Apr 1 16:22:43 2013 -0700
Committer: Benn Mapes <[email protected]>
Committed: Mon Apr 1 16:22:43 2013 -0700

----------------------------------------------------------------------
 tooling/scripts/win-zip.js |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/f658c747/tooling/scripts/win-zip.js
----------------------------------------------------------------------
diff --git a/tooling/scripts/win-zip.js b/tooling/scripts/win-zip.js
index 8455a54..ee32c7a 100644
--- a/tooling/scripts/win-zip.js
+++ b/tooling/scripts/win-zip.js
@@ -23,11 +23,12 @@ file.Close();
 var objShell = new ActiveXObject("shell.application");
 var zipFolder = objShell.NameSpace(zipPath);
 var sourceItems = objShell.NameSpace(sourcePath).items();
-if (zipFolder != null)
-{
+if (zipFolder != null) {
     zipFolder.CopyHere(sourceItems, 4|20);
-    WScript.Sleep(1000);
+    while (zipFolder.items().Count < sourceItems.Count) {
+        WScript.Sleep(100);
+    }
 }
 else {
-       WScript.Echo("Failed to create .zip file.");
+       WScript.StdErr.WriteLine("Failed to create .zip file.");
 }
\ No newline at end of file

Reply via email to