savegames array itself is correctly sorted but the UI is not and lastmodified time is also not written

This commit is contained in:
minjaesong
2022-01-12 11:10:57 +09:00
parent 03a06773c4
commit 9797094cae
5 changed files with 57 additions and 15 deletions

View File

@@ -148,9 +148,15 @@ class VirtualDisk(
private fun serializeEntriesOnly(): ByteArray64 {
val buffer = ByteArray64()
// make sure to write root directory first
entries[0L]!!.let { rootDir ->
rootDir.serialize().forEach { buffer.add(it) }
}
entries.forEach {
val serialised = it.value.serialize()
serialised.forEach { buffer.add(it) }
if (it.key != 0L) {
it.value.serialize().forEach { buffer.add(it) }
}
}
return buffer