cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [08/28] git commit: [CB-2832] Fixed zipping script to ensure all items are copied
Date Mon, 01 Apr 2013 22:28:40 GMT
[CB-2832] Fixed zipping script to ensure all items are copied


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

Branch: refs/heads/master
Commit: 72c6337aa4a9081243c8844dca61295cdbcef2a7
Parents: 18911e8
Author: Benn Mapes <benn.mapes@gmail.com>
Authored: Wed Mar 27 15:28:06 2013 -0700
Committer: Benn Mapes <benn.mapes@gmail.com>
Committed: Wed Mar 27 15:28:06 2013 -0700

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


http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/72c6337a/tooling/scripts/win-zip.js
----------------------------------------------------------------------
diff --git a/tooling/scripts/win-zip.js b/tooling/scripts/win-zip.js
index 8455a54..9a60bfe 100644
--- a/tooling/scripts/win-zip.js
+++ b/tooling/scripts/win-zip.js
@@ -23,11 +23,13 @@ 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


Mime
View raw message