You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by js...@apache.org on 2014/07/03 00:17:27 UTC

webworks commit: CB-6492 AppData hint is wrong for wXP

Repository: cordova-blackberry
Updated Branches:
  refs/heads/master f6d11fc1c -> d8c924135


CB-6492 AppData hint is wrong for wXP

Check for LOCALAPPDATA environment variable (which is what Windows Vista introduced)
Otherwise, use the hard coded value for XP/older


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

Branch: refs/heads/master
Commit: d8c9241354b0e0d61712681ee7b8860ee26b943d
Parents: f6d11fc
Author: Josh Soref <js...@blackberry.com>
Authored: Thu Jun 26 18:21:45 2014 -0400
Committer: Josh Soref <js...@blackberry.com>
Committed: Thu Jun 26 18:21:45 2014 -0400

----------------------------------------------------------------------
 .../bin/templates/project/cordova/lib/signing-utils.js  | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/d8c92413/blackberry10/bin/templates/project/cordova/lib/signing-utils.js
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/cordova/lib/signing-utils.js b/blackberry10/bin/templates/project/cordova/lib/signing-utils.js
index 60445b3..2f3b398 100644
--- a/blackberry10/bin/templates/project/cordova/lib/signing-utils.js
+++ b/blackberry10/bin/templates/project/cordova/lib/signing-utils.js
@@ -30,12 +30,12 @@ function getDefaultPath(file) {
     // UNIX or Linux: ~/.rim
     var p = "";
     if (os.type().toLowerCase().indexOf("windows") >= 0) {
-        // Try Windows XP location
-        p = process.env.USERPROFILE + "\\Local Settings\\Application Data\\Research In Motion\\";
-        if (!fs.existsSync(p)) {
-            // Try Windows Vista and Windows 7 location
-            p = process.env.USERPROFILE + "\\AppData\\Local\\Research In Motion\\";
-        }
+        p = process.env.LOCALAPPDATA === undefined ?
+            /* ...-XP */
+            process.env.USERPROFILE + "\\Local Settings\\Application Data" :
+            /* Vista+ */
+            process.env.LOCALAPPDATA;
+        p += "\\Research In Motion\\";
     } else if (os.type().toLowerCase().indexOf("darwin") >= 0) {
         // Try Mac OS location
         p = process.env.HOME + "/Library/Research In Motion/";