fixed a bug where wires cause quicksave to fail

This commit is contained in:
minjaesong
2021-09-30 10:44:48 +09:00
parent 277ecbcebd
commit 588ac047db
7 changed files with 29 additions and 25 deletions

View File

@@ -373,7 +373,7 @@ open class IngameInstance(val batch: SpriteBatch) : Screen {
val flags2 = FileInputStream(file2).let { it.skip(49L); val r = it.read(); it.close(); r }
val flags1 = FileInputStream(file1).let { it.skip(49L); val r = it.read(); it.close(); r }
if (!(flags2 == 0 && flags1 != 0)) {
if (!(flags2 == 0 && flags1 != 0) || !file2.exists()) {
file1.copyTo(file2, true)
}
} catch (e: NoSuchFileException) {