Исправления автообновления настроек

This commit is contained in:
Gravit 2018-10-29 16:29:59 +07:00
parent e82359a347
commit 897ed1b19e
No known key found for this signature in database
GPG key ID: 061981E1E85D3216

View file

@ -21,7 +21,7 @@
import java.util.Map; import java.util.Map;
public class LauncherSettings { public class LauncherSettings {
public static int settingsMagic = 0xc0de5; public static int settingsMagic = 0xc0de6;
@LauncherAPI @LauncherAPI
public Path file = DirBridge.dir.resolve("settings.bin"); public Path file = DirBridge.dir.resolve("settings.bin");
@LauncherAPI @LauncherAPI
@ -78,7 +78,10 @@ public void read(HInput input) throws IOException, SignatureException
{ {
int magic = input.readInt(); int magic = input.readInt();
if (magic != settingsMagic) { if (magic != settingsMagic) {
throw new java.io.IOException("Settings magic mismatch: " + java.lang.Integer.toString(magic, 16)); setDefault();
LogHelper.warning("Settings magic mismatch: " + java.lang.Integer.toString(magic, 16));
return;
//throw new java.io.IOException();
} }
// Launcher settings // Launcher settings