Skip to content

Commit c9db9d4

Browse files
committed
Avoid checking on non system file systems
1 parent 0a2fbb6 commit c9db9d4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎okhttp/src/main/kotlin/okhttp3/internal/cache/CacheLock.kt‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ internal object CacheLock {
3232
fileSystem: FileSystem,
3333
directory: Path,
3434
): Closeable {
35-
return if (fileSystem == FileSystem.SYSTEM && !Platform.isAndroid) {
35+
if (fileSystem != FileSystem.SYSTEM) {
36+
return Closeable {}
37+
}
38+
39+
return if (!Platform.isAndroid) {
3640
fileSystemLock(inMemoryLock(directory), directory)
3741
} else {
3842
inMemoryLock(directory)

0 commit comments

Comments
 (0)