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 {
57
57
private static String PYTHON = "python" ;
58
58
59
59
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
+ });
61
64
Builder builder = Context .newBuilder ()
62
65
// set true to allow experimental options
63
66
.allowExperimentalOptions (true )
@@ -121,6 +124,8 @@ public static void main(String[] args) throws IOException {
121
124
} else {
122
125
throw e ;
123
126
}
127
+ } finally {
128
+ vfs .close ();
124
129
}
125
130
}
126
131
You can’t perform that action at this time.
0 commit comments