mirror of
https://github.com/square/okhttp.git
synced 2026-01-18 20:40:58 +03:00
Use Okio's appending sink for File.
This commit is contained in:
@@ -224,7 +224,7 @@ public final class DiskLruCache implements Closeable {
|
||||
try {
|
||||
cache.readJournal();
|
||||
cache.processJournal();
|
||||
cache.journalWriter = Okio.buffer(Okio.sink(new FileOutputStream(cache.journalFile, true)));
|
||||
cache.journalWriter = Okio.buffer(Okio.appendingSink(cache.journalFile));
|
||||
return cache;
|
||||
} catch (IOException journalIsCorrupt) {
|
||||
Platform.get().logW("DiskLruCache " + directory + " is corrupt: "
|
||||
|
||||
Reference in New Issue
Block a user