Skip to content

Commit

Permalink
Ensure the /Log folder is created before trying to create multi_log
Browse files Browse the repository at this point in the history
  • Loading branch information
Reco1I committed Aug 21, 2023
1 parent c187864 commit 29759f9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/com/reco1l/legacy/ui/multiplayer/Multiplayer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,15 @@ object Multiplayer
var finalData: Array<StatisticV2>? = null


private val LOG_FILE = File("${Config.getDefaultCorePath()}/Log", "multi_log.txt")
private val LOG_FOLDER = File("${Config.getDefaultCorePath()}/Log").apply {
if (!exists())
mkdirs()
}

private val LOG_FILE = File(LOG_FOLDER, "multi_log.txt").apply {
if (!exists())
createNewFile()
}

init
{
Expand Down

0 comments on commit 29759f9

Please sign in to comment.