mirror of
https://github.com/yairm210/Unciv.git
synced 2025-03-03 22:22:51 +07:00
Android autosave location fix (#8572)
This commit is contained in:
parent
8e94998106
commit
1018460730
@ -417,8 +417,13 @@ class UncivFiles(
|
||||
if(nextTurn) {
|
||||
val newAutosaveFilename =
|
||||
SAVE_FILES_FOLDER + File.separator + AUTOSAVE_FILE_NAME + "-${gameInfo.currentPlayer}-${gameInfo.turns}"
|
||||
getSave(AUTOSAVE_FILE_NAME).copyTo(files.local(newAutosaveFilename))
|
||||
|
||||
val file =
|
||||
if (preferExternalStorage && files.isExternalStorageAvailable)
|
||||
files.external(newAutosaveFilename)
|
||||
else
|
||||
files.local(newAutosaveFilename)
|
||||
getSave(AUTOSAVE_FILE_NAME).copyTo(file)
|
||||
|
||||
fun getAutosaves(): Sequence<FileHandle> {
|
||||
return getSaves().filter { it.name().startsWith(AUTOSAVE_FILE_NAME) }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user