v1.2.0: fixed errors with new save deletion logic
This commit is contained in:
@@ -672,12 +672,9 @@ public class Dungeon {
|
||||
FileUtils.deleteFile(folder + "/" + file);
|
||||
}
|
||||
}
|
||||
ArrayList<String> files = FileUtils.filesInDir(GamesInProgress.gameFolder(save));
|
||||
FileUtils.deleteDir(GamesInProgress.gameFolder(save));
|
||||
}
|
||||
|
||||
//we empty this file instead of delete due to steam cloud only persisting file deletions locally
|
||||
FileUtils.setFileEmpty(GamesInProgress.gameFile(save));
|
||||
FileUtils.zeroFile(GamesInProgress.gameFile(save), 1);
|
||||
|
||||
GamesInProgress.delete( save );
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ public class GamesInProgress {
|
||||
|
||||
public static boolean gameExists( int slot ){
|
||||
return FileUtils.dirExists(gameFolder(slot))
|
||||
&& FileUtils.fileExists(gameFile(slot));
|
||||
&& FileUtils.fileLength(gameFile(slot)) > 1;
|
||||
}
|
||||
|
||||
public static String gameFolder( int slot ){
|
||||
@@ -74,7 +74,7 @@ public class GamesInProgress {
|
||||
|
||||
public static ArrayList<Info> checkAll(){
|
||||
ArrayList<Info> result = new ArrayList<>();
|
||||
for (int i = 0; i <= MAX_SLOTS; i++){
|
||||
for (int i = 1; i <= MAX_SLOTS; i++){
|
||||
Info curr = check(i);
|
||||
if (curr != null) result.add(curr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user