From 274db7ddf71e46675dbdb1c41d31d0d201c01c57 Mon Sep 17 00:00:00 2001 From: James Quinley Date: Thu, 13 Oct 2022 21:06:10 -0700 Subject: [PATCH] Tweaks error messages, as file path shows on exr --- .../AOTSK_Login_Delegation_Server_jar.xml | 32 +++++++++---------- .../delegationServices.java | 11 +++---- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/.idea/artifacts/AOTSK_Login_Delegation_Server_jar.xml b/.idea/artifacts/AOTSK_Login_Delegation_Server_jar.xml index cbc2ce4..e03d7e0 100644 --- a/.idea/artifacts/AOTSK_Login_Delegation_Server_jar.xml +++ b/.idea/artifacts/AOTSK_Login_Delegation_Server_jar.xml @@ -1,25 +1,25 @@ $PROJECT_DIR$/out/artifacts/AOTSK_Login_Delegation_Server_jar - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/java/com/jamesquinley/DelegationServices/delegationServices.java b/src/main/java/com/jamesquinley/DelegationServices/delegationServices.java index 56eca87..a75df6a 100644 --- a/src/main/java/com/jamesquinley/DelegationServices/delegationServices.java +++ b/src/main/java/com/jamesquinley/DelegationServices/delegationServices.java @@ -1413,13 +1413,12 @@ public class delegationServices { String policyDocument; try { - File homedir = new File(System.getProperty("user.home")); - policyDocument = Files.readString(Path.of(homedir + "/ocs/policy/launcher/legal/eula.txt")); + policyDocument = Files.readString(Path.of(System.getProperty("user.home") + "/ocs/policy/launcher/legal/eula.txt")); } catch (Exception EXR) { System.out.println("Unable to pull file, fallback."); - policyDocument = "Policy file does not exist on server. (Unable to find file in /ocs/policy/launcher/legal/accountagreement.txt) This is an issue on our end. Error ID: " + EXR; + policyDocument = "Policy file does not exist on server. This is an issue on our end. Error ID: " + EXR; } BasicDBObject updateQuery = new BasicDBObject(); @@ -1444,13 +1443,13 @@ public class delegationServices { String policyDocument; try { - File homedir = new File(System.getProperty("user.home")); - policyDocument = Files.readString(Path.of(homedir + "/ocs/policy/launcher/legal/eula.txt")); + // File homedir = new File(System.getProperty("user.home")); + policyDocument = Files.readString(Path.of(System.getProperty("user.home") + "/ocs/policy/launcher/legal/eula.txt")); } catch (Exception EXR) { System.out.println("Unable to pull file, fallback."); - policyDocument = "Policy file does not exist on server. (Unable to find file in /ocs/policy/launcher/legal/accountagreement.txt) This is an issue on our end. Error ID: " + EXR; + policyDocument = "Policy file does not exist on server. This is an issue on our end. Error ID: " + EXR; } BasicDBObject updateQuery = new BasicDBObject();