From 9ed319719141f02db5a37e61a9b6215eec2265fa Mon Sep 17 00:00:00 2001 From: rtm516 Date: Sun, 22 Nov 2020 01:59:57 +0000 Subject: [PATCH] Fix en_us downloading and hashing on Android (#1574) --- .../main/java/org/geysermc/connector/utils/LocaleUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/connector/src/main/java/org/geysermc/connector/utils/LocaleUtils.java b/connector/src/main/java/org/geysermc/connector/utils/LocaleUtils.java index 4e9e4b00..aac344dc 100644 --- a/connector/src/main/java/org/geysermc/connector/utils/LocaleUtils.java +++ b/connector/src/main/java/org/geysermc/connector/utils/LocaleUtils.java @@ -140,7 +140,7 @@ public class LocaleUtils { if (locale.equals("en_us")) { try { - Path hashFile = localeFile.getParentFile().toPath().resolve("en_us.hash"); + Path hashFile = GeyserConnector.getInstance().getBootstrap().getConfigFolder().resolve("locales/en_us.hash"); if (hashFile.toFile().exists()) { curHash = String.join("", Files.readAllLines(hashFile)); } @@ -247,7 +247,7 @@ public class LocaleUtils { localeJar.close(); // Store the latest jar hash - FileUtils.writeFile(localeFile.getParentFile().toPath().resolve("en_us.hash").toString(), clientJarInfo.getSha1().toCharArray()); + FileUtils.writeFile(GeyserConnector.getInstance().getBootstrap().getConfigFolder().resolve("locales/en_us.hash").toString(), clientJarInfo.getSha1().toCharArray()); // Delete the nolonger needed client/server jar Files.delete(tmpFilePath);