Don't delete uploaded logs (#3540)
This commit is contained in:
parent
3001efb525
commit
1d5509e2eb
1 changed files with 0 additions and 15 deletions
|
|
@ -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<File>.deleteAllExceptMostRecent() {
|
||||
if (size > 1) {
|
||||
val mostRecentFile = maxByOrNull { it.lastModified() }
|
||||
forEach { file ->
|
||||
if (file != mostRecentFile) {
|
||||
file.safeDelete()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ==============================================================================================================
|
||||
// Logcat management
|
||||
// ==============================================================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue