Skip to content

Commit

Permalink
Attempting to fix conflict weirdness
Browse files Browse the repository at this point in the history
  • Loading branch information
hannah-smartbear committed Sep 26, 2024
1 parent 70ed171 commit 91244bb
Showing 1 changed file with 0 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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
}
}

Expand Down

0 comments on commit 91244bb

Please sign in to comment.