Skip to content

Commit

Permalink
Avoid checking on non system file systems
Browse files Browse the repository at this point in the history
  • Loading branch information
yschimke committed Apr 1, 2024
1 parent 0a2fbb6 commit c9db9d4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion okhttp/src/main/kotlin/okhttp3/internal/cache/CacheLock.kt
Expand Up @@ -32,7 +32,11 @@ internal object CacheLock {
fileSystem: FileSystem,
directory: Path,
): Closeable {
return if (fileSystem == FileSystem.SYSTEM && !Platform.isAndroid) {
if (fileSystem != FileSystem.SYSTEM) {
return Closeable {}
}

return if (!Platform.isAndroid) {
fileSystemLock(inMemoryLock(directory), directory)
} else {
inMemoryLock(directory)
Expand Down

0 comments on commit c9db9d4

Please sign in to comment.