Skip to content

Commit 1d5509e

Browse files
authored
Don't delete uploaded logs (#3540)
1 parent 3001efb commit 1d5509e

File tree

1 file changed

+0
-15
lines changed
  • features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/reporter

1 file changed

+0
-15
lines changed

features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/reporter/DefaultBugReporter.kt

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ class DefaultBugReporter @Inject constructor(
114114
else -> compressFile(file)
115115
}
116116
}
117-
files.deleteAllExceptMostRecent()
118117
}
119118
if (withCrashLogs || withDevicesLogs) {
120119
saveLogCat()
@@ -316,20 +315,6 @@ class DefaultBugReporter @Inject constructor(
316315
}.orEmpty()
317316
}
318317

319-
/**
320-
* Delete all the log files except the most recent one.
321-
*/
322-
private fun List<File>.deleteAllExceptMostRecent() {
323-
if (size > 1) {
324-
val mostRecentFile = maxByOrNull { it.lastModified() }
325-
forEach { file ->
326-
if (file != mostRecentFile) {
327-
file.safeDelete()
328-
}
329-
}
330-
}
331-
}
332-
333318
// ==============================================================================================================
334319
// Logcat management
335320
// ==============================================================================================================

0 commit comments

Comments
 (0)