mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-22 19:08:48 -04:00
Delete temporary files created when downloading mods
This commit is contained in:
parent
28fc6a014c
commit
3eb07c5956
@ -93,6 +93,11 @@ open class UncivGame(val isConsoleMode: Boolean = false) : Game(), PlatformSpeci
|
||||
}
|
||||
Current = this
|
||||
files = UncivFiles(Gdx.files)
|
||||
Concurrency.run {
|
||||
// Delete temporary files created when downloading mods
|
||||
val tempFiles = Gdx.files.local("mods").list().filter { !it.isDirectory && it.name().startsWith("temp-") }
|
||||
for (file in tempFiles) file.delete()
|
||||
}
|
||||
|
||||
// If this takes too long players, especially with older phones, get ANR problems.
|
||||
// Whatever needs graphics needs to be done on the main thread,
|
||||
|
Loading…
x
Reference in New Issue
Block a user