Don't delete uploaded logs (#3540)
This commit is contained in:
parent
bb11bc5494
commit
12948b147d
1 changed files with 0 additions and 15 deletions
|
|
@ -114,7 +114,6 @@ class DefaultBugReporter @Inject constructor(
|
||||||
else -> compressFile(file)
|
else -> compressFile(file)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
files.deleteAllExceptMostRecent()
|
|
||||||
}
|
}
|
||||||
if (withCrashLogs || withDevicesLogs) {
|
if (withCrashLogs || withDevicesLogs) {
|
||||||
saveLogCat()
|
saveLogCat()
|
||||||
|
|
@ -316,20 +315,6 @@ class DefaultBugReporter @Inject constructor(
|
||||||
}.orEmpty()
|
}.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
|
// Logcat management
|
||||||
// ==============================================================================================================
|
// ==============================================================================================================
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue