From c8676f7ffe210dafc142edec987ead3d7348b532 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Fri, 31 May 2019 17:36:32 +0300 Subject: [PATCH] JavaScript: fix filesystem issue --- .../org/teavm/classlib/fs/memory/InMemoryVirtualFile.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/classlib/src/main/java/org/teavm/classlib/fs/memory/InMemoryVirtualFile.java b/classlib/src/main/java/org/teavm/classlib/fs/memory/InMemoryVirtualFile.java index a398d8d58..0f9dc31f8 100644 --- a/classlib/src/main/java/org/teavm/classlib/fs/memory/InMemoryVirtualFile.java +++ b/classlib/src/main/java/org/teavm/classlib/fs/memory/InMemoryVirtualFile.java @@ -53,6 +53,10 @@ public class InMemoryVirtualFile extends AbstractInMemoryVirtualFile { return null; } + if (writable && readOnly) { + return null; + } + return new VirtualFileAccessor() { @Override public int read(int pos, byte[] buffer, int offset, int limit) {