Skip to content
This repository has been archived by the owner on Apr 18, 2019. It is now read-only.

Commit

Permalink
CB-6492 AppData hint is wrong for wXP
Browse files Browse the repository at this point in the history
Check for LOCALAPPDATA environment variable (which is what Windows Vista introduced)
Otherwise, use the hard coded value for XP/older
  • Loading branch information
jsoref committed Jun 26, 2014
1 parent f6d11fc commit d8c9241
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions blackberry10/bin/templates/project/cordova/lib/signing-utils.js
Expand Up @@ -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/";
Expand Down

0 comments on commit d8c9241

Please sign in to comment.