Skip to content

Commit

Permalink
Add missing flush calls to DiskLruCache.
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrtwhite committed Nov 14, 2024
1 parent f93ac43 commit c141a1b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions coil-core/src/commonMain/kotlin/coil3/disk/DiskLruCache.kt
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ internal class DiskLruCache(
writeByte(' '.code)
writeUtf8(key)
writeByte('\n'.code)
flush()
}

if (journalRewriteRequired()) {
Expand Down Expand Up @@ -553,6 +554,7 @@ internal class DiskLruCache(
writeByte(' '.code)
writeUtf8(entry.key)
writeByte('\n'.code)
flush()
}
lruEntries.remove(entry.key)

Expand Down

0 comments on commit c141a1b

Please sign in to comment.