Skip to content

Commit

Permalink
handle mod uninstall when game is open (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
Boy0000 authored Jun 23, 2022
1 parent 5b4aa69 commit 979c3c8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/main/kotlin/com/mineinabyss/launchy/logic/LaunchyState.kt
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,13 @@ class LaunchyState(
}
for (mod in queuedDeletions) {
launch(Dispatchers.IO) {
mod.file.deleteIfExists()
_deleted++
try {
mod.file.deleteIfExists()
} catch (e: FileSystemException) {
return@launch
} finally {
_deleted++
}
}
}
}
Expand Down

0 comments on commit 979c3c8

Please sign in to comment.