hack jython tests to work on windows

windows needs access to the "root" holding the jar file (see https://github.com/int3/jython/blob/master/src/org/python/core/PySystemState.java#L571-L616)

Its different on windows, because when canonicalizing the file (case sensitivity), it needs access to the file.

Closes #13476
This commit is contained in:
Robert Muir 2015-09-10 14:59:23 -04:00
parent e18528d1c5
commit 6cdcc805cc
1 changed files with 1 additions and 0 deletions

View File

@ -97,6 +97,7 @@ public class BootstrapForTesting {
String filename = path.getFileName().toString(); String filename = path.getFileName().toString();
if (filename.contains("jython") && filename.endsWith(".jar")) { if (filename.contains("jython") && filename.endsWith(".jar")) {
// just enough so it won't fail when it does not exist // just enough so it won't fail when it does not exist
perms.add(new FilePermission(path.getParent().toString(), "read,readlink"));
perms.add(new FilePermission(path.getParent().resolve("Lib").toString(), "read,readlink")); perms.add(new FilePermission(path.getParent().resolve("Lib").toString(), "read,readlink"));
} }
} }