mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-12 16:59:11 +07:00
Android autosave location fix (#8572)
This commit is contained in:
@ -417,7 +417,12 @@ 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) }
|
||||
|
Reference in New Issue
Block a user