diff --git a/archive/src/main/kotlin/org/openrs2/archive/cache/CacheImporter.kt b/archive/src/main/kotlin/org/openrs2/archive/cache/CacheImporter.kt index 04127af7..750b881a 100644 --- a/archive/src/main/kotlin/org/openrs2/archive/cache/CacheImporter.kt +++ b/archive/src/main/kotlin/org/openrs2/archive/cache/CacheImporter.kt @@ -102,11 +102,11 @@ public class CacheImporter @Inject constructor( // import master index val masterIndex = createMasterIndex(store) - if (masterIndex.index.entries.isEmpty()) { - throw IOException("Master index empty, cache probably corrupt") - } - val masterIndexId = try { + if (masterIndex.index.entries.isEmpty()) { + throw IOException("Master index empty, cache probably corrupt") + } + addMasterIndex(connection, masterIndex) } finally { masterIndex.release()