Skip to content

Commit a949fb0

Browse files
committed
Strip invalid characters from logcat filenames
1 parent 6610e3c commit a949fb0

File tree

1 file changed

+2
-1
lines changed
  • app/src/main/java/com/hiddenramblings/tagmo/eightbit/io

1 file changed

+2
-1
lines changed

app/src/main/java/com/hiddenramblings/tagmo/eightbit/io/Debug.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,8 @@ object Debug {
266266
}
267267

268268
private fun writeLogcat(subject: String, logText: String) {
269-
FileOutputStream(File(Storage.getDownloadDir(null), "${subject}-${System.currentTimeMillis()}.txt")).use {
269+
val fileName = "${subject.replace(":", "")}.${System.currentTimeMillis()}.txt"
270+
FileOutputStream(File(Storage.getDownloadDir(null), fileName)).use {
270271
it.write(logText.toByteArray())
271272
}
272273
}

0 commit comments

Comments
 (0)