Skip to content

Commit 073c7ef

Browse files
committed
synchronize access to VFS.defaultFileSystemProvider
1 parent 529e993 commit 073c7ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

graalpython/org.graalvm.python.embedding/src/org/graalvm/python/embedding/utils/VirtualFileSystemImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@
8888
import java.util.logging.SimpleFormatter;
8989

9090
import static org.graalvm.python.embedding.utils.VirtualFileSystem.HostIO.NONE;
91-
import static org.graalvm.python.embedding.utils.VirtualFileSystem.HostIO.READ_WRITE;
9291

9392
final class VirtualFileSystemImpl implements FileSystem, AutoCloseable {
9493

@@ -585,8 +584,9 @@ void extractResources(Path resourcesDirectory) throws IOException {
585584

586585
private FileSystemProvider defaultFileSystemProvider;
587586

588-
private FileSystemProvider getDefaultFileSystem() {
587+
private synchronized FileSystemProvider getDefaultFileSystem() {
589588
if (defaultFileSystemProvider == null) {
589+
// c&p from c.o.t.polyglot.FileSystems.DeniedIOFileSystem
590590
for (FileSystemProvider provider : FileSystemProvider.installedProviders()) {
591591
if ("file".equals(provider.getScheme())) {
592592
defaultFileSystemProvider = provider;

0 commit comments

Comments
 (0)