Make isSaveValid check backups
This commit is contained in:
@@ -56,8 +56,13 @@ public class SaveIO{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isSaveValid(Fi file){
|
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)))){
|
try(DataInputStream stream = new DataInputStream(new InflaterInputStream(file.read(bufferSize)))){
|
||||||
return isSaveValid(stream);
|
getMeta(stream);
|
||||||
|
return true;
|
||||||
}catch(Throwable e){
|
}catch(Throwable e){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user