forked from SteamWar/SteamWar
Hotfix: Groups
This commit is contained in:
@@ -37,6 +37,9 @@ class Groups {
|
||||
private var groups: GroupsData = if (kGroupsFile.exists()) {
|
||||
Cbor.decodeFromByteArray(kGroupsFile.readBytes())
|
||||
} else {
|
||||
if (!kGroupsFile.parentFile.exists()) {
|
||||
kGroupsFile.parentFile.mkdirs()
|
||||
}
|
||||
kGroupsFile.createNewFile()
|
||||
kGroupsFile.writeBytes(Cbor.encodeToByteArray(GroupsData(mutableListOf())))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user