This commit is contained in:
Anuken
2023-01-07 14:01:28 -05:00
parent 0b00747f29
commit 2a71f4620e
2 changed files with 7 additions and 8 deletions

View File

@@ -218,8 +218,8 @@ public class IOSLauncher extends IOSApplication.Delegate{
if(file.extension().equalsIgnoreCase(saveExtension)){ //open save
if(SaveIO.isSaveValid(file)){
try{
try{
if(SaveIO.isSaveValid(file)){
SaveMeta meta = SaveIO.getMeta(new DataInputStream(new InflaterInputStream(file.read(Streams.defaultBufferSize))));
if(meta.tags.containsKey("name")){
//is map
@@ -232,13 +232,12 @@ public class IOSLauncher extends IOSApplication.Delegate{
SaveSlot slot = control.saves.importSave(file);
ui.load.runLoadSave(slot);
}
}catch(IOException e){
ui.showException("@save.import.fail", e);
}else{
ui.showErrorMessage("@save.import.invalid");
}
}else{
ui.showErrorMessage("@save.import.invalid");
}catch(Throwable e){
ui.showException("@save.import.fail", e);
}
}
}));
}