3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-12-27 16:40:14 +01:00

Fix en_us downloading and hashing on Android (#1574)

Dieser Commit ist enthalten in:
rtm516 2020-11-22 01:59:57 +00:00 committet von GitHub
Ursprung 0268ef7d2b
Commit 9ed3197191
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -140,7 +140,7 @@ public class LocaleUtils {
if (locale.equals("en_us")) { if (locale.equals("en_us")) {
try { 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()) { if (hashFile.toFile().exists()) {
curHash = String.join("", Files.readAllLines(hashFile)); curHash = String.join("", Files.readAllLines(hashFile));
} }
@ -247,7 +247,7 @@ public class LocaleUtils {
localeJar.close(); localeJar.close();
// Store the latest jar hash // 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 // Delete the nolonger needed client/server jar
Files.delete(tmpFilePath); Files.delete(tmpFilePath);