File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
graalpython/lib-graalpython/modules/standalone/templates Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,10 @@ public class Main {
5757 private static String PYTHON = "python" ;
5858
5959 public static void main (String [] args ) throws IOException {
60- VirtualFileSystem vfs = new VirtualFileSystem ();
60+ VirtualFileSystem vfs = new VirtualFileSystem (p -> {
61+ String s = p .toString ();
62+ return s .endsWith (".so" ) || s .endsWith (".dylib" ) || s .endsWith (".pyd" );
63+ });
6164 Builder builder = Context .newBuilder ()
6265 // set true to allow experimental options
6366 .allowExperimentalOptions (true )
@@ -121,6 +124,8 @@ public static void main(String[] args) throws IOException {
121124 } else {
122125 throw e ;
123126 }
127+ } finally {
128+ vfs .close ();
124129 }
125130 }
126131
You can’t perform that action at this time.
0 commit comments