You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2014/08/14 03:48:22 UTC

[9/9] git commit: CB-7305 remove trailing slash from dest

CB-7305 remove trailing slash from dest


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

Branch: refs/heads/master
Commit: 4914c9865873a7443a16143de8d93061642c1cf1
Parents: 4a36392
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Wed Aug 13 18:42:37 2014 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Wed Aug 13 18:42:37 2014 -0700

----------------------------------------------------------------------
 wp8/bin/create.js | 13 +++++++++++++
 1 file changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/4914c986/wp8/bin/create.js
----------------------------------------------------------------------
diff --git a/wp8/bin/create.js b/wp8/bin/create.js
index 04f4392..b63cb13 100644
--- a/wp8/bin/create.js
+++ b/wp8/bin/create.js
@@ -249,6 +249,19 @@ if (args.Count() > 0) {
         Log("CREATE FAILED.", true);
         WScript.Quit(1);
     }
+    else {
+        // Fix trailing slash issue
+        while(destPath.length && destPath.substr(destPath.length - 1,1) == "\\") {
+            destPath = destPath.substr(0,destPath.length - 1);
+        }
+        if(!destPath.length) {
+            Log("Invalid destination specified: " + args(0),true);
+            WScript.Quit(1);
+        }
+    }
+
+
+
     var packageName = "Cordova.Example";
     if (args.Count() > 1) {
         packageName = args(1);