diff --git a/bugsnag-android-core/src/main/java/com/bugsnag/android/FileStore.kt b/bugsnag-android-core/src/main/java/com/bugsnag/android/FileStore.kt index a5b9a0ec8c..0cd0bafc50 100644 --- a/bugsnag-android-core/src/main/java/com/bugsnag/android/FileStore.kt +++ b/bugsnag-android-core/src/main/java/com/bugsnag/android/FileStore.kt @@ -113,7 +113,6 @@ internal abstract class FileStore( if (isStorageDirValid(storageDir)) { val listFiles = storageDir.listFiles() ?: return if (listFiles.size < maxStoreCount) return -<<<<<<< HEAD // Number of files to discard takes into account that a new file may need to be written val numberToDiscard = listFiles.size - maxStoreCount + 1 deleteStoredFiles( @@ -133,24 +132,6 @@ internal abstract class FileStore( } .toSet() ) -======= - val sortedListFiles = listFiles.sortedBy { it.lastModified() } - // Number of files to discard takes into account that a new file may need to be written - val numberToDiscard = listFiles.size - maxStoreCount + 1 - var discardedCount = 0 - for (file in sortedListFiles) { - if (discardedCount == numberToDiscard) { - return - } else if (!queuedFiles.contains(file)) { - logger.w( - "Discarding oldest error as stored error limit reached: '" + - file.path + '\'' - ) - deleteStoredFiles(setOf(file)) - discardedCount++ - } - } ->>>>>>> 3aabb9e6ce6479ddbf471051052a9d60ac45ceb0 } }