mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-04 20:01:55 +00:00
Don't delete uploaded logs (#3540)
This commit is contained in:
committed by
GitHub
parent
3001efb525
commit
1d5509e2eb
-15
@@ -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
|
||||||
// ==============================================================================================================
|
// ==============================================================================================================
|
||||||
|
|||||||
Reference in New Issue
Block a user