test for windows gpg home

This commit is contained in:
Craig Raw 2024-02-22 14:12:08 +02:00
parent f455d94a01
commit d2621eb87d

View file

@ -172,7 +172,10 @@ public class PGPUtils {
} }
if(isWindows()) { 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"); return new File(System.getProperty("user.home"), ".gnupg");