Skip to content

Commit

Permalink
Don't delete uploaded logs (#3540)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmartinesp authored Oct 1, 2024
1 parent 3001efb commit 1d5509e
Showing 1 changed file with 0 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ class DefaultBugReporter @Inject constructor(
else -> compressFile(file)
}
}
files.deleteAllExceptMostRecent()
}
if (withCrashLogs || withDevicesLogs) {
saveLogCat()
Expand Down Expand Up @@ -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
// ==============================================================================================================
Expand Down

0 comments on commit 1d5509e

Please sign in to comment.