Make isSaveValid check backups

This commit is contained in:
Anuken 2023-12-10 15:48:35 -05:00
parent 3e4b86d095
commit a0f235b430

View file

@ -56,8 +56,13 @@ public class SaveIO{
}
public static boolean isSaveValid(Fi file){
return isSaveFileValid(file) || isSaveFileValid(backupFileFor(file));
}
private static boolean isSaveFileValid(Fi file){
try(DataInputStream stream = new DataInputStream(new InflaterInputStream(file.read(bufferSize)))){
return isSaveValid(stream);
getMeta(stream);
return true;
}catch(Throwable e){
return false;
}