diff --git a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/reporter/DefaultBugReporter.kt b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/reporter/DefaultBugReporter.kt index 1888c3851a7..9376959d57a 100755 --- a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/reporter/DefaultBugReporter.kt +++ b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/reporter/DefaultBugReporter.kt @@ -114,7 +114,6 @@ class DefaultBugReporter @Inject constructor( else -> compressFile(file) } } - files.deleteAllExceptMostRecent() } if (withCrashLogs || withDevicesLogs) { saveLogCat() @@ -316,20 +315,6 @@ class DefaultBugReporter @Inject constructor( }.orEmpty() } - /** - * Delete all the log files except the most recent one. - */ - private fun List.deleteAllExceptMostRecent() { - if (size > 1) { - val mostRecentFile = maxByOrNull { it.lastModified() } - forEach { file -> - if (file != mostRecentFile) { - file.safeDelete() - } - } - } - } - // ============================================================================================================== // Logcat management // ==============================================================================================================