aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Brunschwig <[email protected]>2021-05-02 08:52:42 +0200
committerPatrick Brunschwig <[email protected]>2021-05-02 08:52:42 +0200
commit64c555bf4dbed58c72bd92299d1c7c869c686451 (patch)
treed0db86cecb3965657b9b745c627ca17a35e00d1d
parentfc2209c3995eef31fe0f10cbbeffd7d94b300ec4 (diff)
downloadenigmail-64c555bf4dbed58c72bd92299d1c7c869c686451.tar.gz
enigmail-64c555bf4dbed58c72bd92299d1c7c869c686451.tar.bz2
enigmail-64c555bf4dbed58c72bd92299d1c7c869c686451.zip
fixed detection of gpgme-json.exe on Windows
-rw-r--r--package/cryptoAPI/gpgme.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/package/cryptoAPI/gpgme.js b/package/cryptoAPI/gpgme.js
index bb0c383c..39d2cf88 100644
--- a/package/cryptoAPI/gpgme.js
+++ b/package/cryptoAPI/gpgme.js
@@ -64,6 +64,12 @@ class GpgMECryptoAPI extends CryptoAPI {
* @param {String } preferredPath: try to use specific path to locate tool (gpg)
*/
initialize(parentWindow, esvc, preferredPath) {
+ if (!esvc) {
+ esvc = {
+ environment: Cc["@mozilla.org/process/environment;1"].getService(Ci.nsIEnvironment)
+ };
+ }
+
this._gpgmePath = resolvePath(esvc.environment);
}
@@ -875,10 +881,10 @@ function resolvePath(env) {
for (let i = 0; i < installDir.length && !toolPath; i++) {
let gpgPath = EnigmailOS.getWinRegistryString(installDir[i], "Install Directory", nsIWindowsRegKey.ROOT_KEY_LOCAL_MACHINE);
- toolPath = EnigmailFiles.resolvePath(toolName, gpgPath, EnigmailOS.isDosLike());
+ toolPath = EnigmailFiles.resolvePath(toolName, gpgPath, EnigmailOS.isDosLike);
if (!toolPath) {
gpgPath += "\\bin";
- toolPath = EnigmailFiles.resolvePath(toolName, gpgPath, EnigmailOS.isDosLike());
+ toolPath = EnigmailFiles.resolvePath(toolName, gpgPath, EnigmailOS.isDosLike);
}
}
}