From d2621eb87d787433d4358fa18acc7e78c330bc86 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Thu, 22 Feb 2024 14:12:08 +0200 Subject: [PATCH] test for windows gpg home --- src/main/java/com/sparrowwallet/drongo/pgp/PGPUtils.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/sparrowwallet/drongo/pgp/PGPUtils.java b/src/main/java/com/sparrowwallet/drongo/pgp/PGPUtils.java index 91321f6..2b218b2 100644 --- a/src/main/java/com/sparrowwallet/drongo/pgp/PGPUtils.java +++ b/src/main/java/com/sparrowwallet/drongo/pgp/PGPUtils.java @@ -172,7 +172,10 @@ public class PGPUtils { } if(isWindows()) { - return new File(System.getenv("APPDATA"), "gnupg"); + File winHome = new File(System.getenv("APPDATA"), "gnupg"); + if(winHome.exists()) { + return winHome; + } } return new File(System.getProperty("user.home"), ".gnupg");