small save fix for fresh install
This commit is contained in:
parent
74b3140344
commit
72bacc826a
@ -133,7 +133,12 @@ public class SaveUtils {
|
|||||||
* @return The list of all saves
|
* @return The list of all saves
|
||||||
*/
|
*/
|
||||||
public static List<String> getSaves(){
|
public static List<String> getSaves(){
|
||||||
return FileUtils.listDirectory("./saves");
|
if(FileUtils.checkFileExists("./saves")){
|
||||||
|
return FileUtils.listDirectory("./saves");
|
||||||
|
} else {
|
||||||
|
FileUtils.createDirectory("./saves");
|
||||||
|
return FileUtils.listDirectory("./saves");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user