File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
pacmc-app/src/commonMain/kotlin/net/axay/pacmc/app/features Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -179,14 +179,14 @@ class Archive(val name: String) {
179
179
}
180
180
181
181
private suspend fun uninstall (modId : ModId ): TransactionPartResult {
182
- val archive = realm.findArchive()
182
+ val dbArchive = realm.findArchive()
183
183
184
184
val wasPresent = realm.write {
185
- findLatest(archive )!! .installed.removeAll { it.readModId() == modId }
185
+ findLatest(dbArchive )!! .installed.removeAll { it.readModId() == modId }
186
186
}
187
187
188
188
var removedAny = false
189
- Environment .fileSystem.list(archive .readPath()).forEach {
189
+ Environment .fileSystem.list(dbArchive .readPath()).forEach {
190
190
if (it.isArchiveFile() && ModFile .modIdFromPath(it) == modId) {
191
191
removedAny = true
192
192
Environment .fileSystem.delete(path = it, mustExist = false )
@@ -215,11 +215,11 @@ class Archive(val name: String) {
215
215
}
216
216
217
217
suspend fun prepareRefresh () {
218
- val archive = realm.findArchive()
218
+ val dbArchive = realm.findArchive()
219
219
realm.write {
220
- findLatest(archive )!! .installed.removeAll { it.dependency }
220
+ findLatest(dbArchive )!! .installed.removeAll { it.dependency }
221
221
}
222
- Environment .fileSystem.list(archive .readPath()).forEach {
222
+ Environment .fileSystem.list(dbArchive .readPath()).forEach {
223
223
if (it.isArchiveFile()) {
224
224
Environment .fileSystem.delete(it, mustExist = false )
225
225
}
You can’t perform that action at this time.
0 commit comments