@@ -1670,7 +1670,6 @@ private void initializePosixSupport() {
16701670 }
16711671
16721672 private TruffleString langHome , sysPrefix , basePrefix , coreHome , capiHome , jniHome , stdLibHome ;
1673- private TruffleFile homeResourcesFile ;
16741673
16751674 public void initializeHomeAndPrefixPaths (Env newEnv , String languageHome ) {
16761675 if (ImageInfo .inImageBuildtimeCode ()) {
@@ -1708,8 +1707,7 @@ public void initializeHomeAndPrefixPaths(Env newEnv, String languageHome) {
17081707 () -> {
17091708 try {
17101709 TruffleFile internalResource = newEnv .getInternalResource ("python-home" );
1711- homeResourcesFile = internalResource == null ? null : internalResource .getAbsoluteFile ();
1712- return homeResourcesFile ;
1710+ return internalResource == null ? null : internalResource .getAbsoluteFile ();
17131711 } catch (IOException e ) {
17141712 // fall through
17151713 }
@@ -2278,15 +2276,6 @@ void releaseGil() {
22782276 */
22792277 @ TruffleBoundary
22802278 public TruffleFile getPublicTruffleFileRelaxed (TruffleString path , TruffleString ... allowedSuffixes ) {
2281- if (homeResourcesFile != null && !env .isFileIOAllowed ()) {
2282- // XXX: Workaround for Truffle resources not being considered internal truffle files
2283- String jlPath = path .toJavaStringUncached ();
2284- String jlHome = langHome .toJavaStringUncached ();
2285- if (jlPath .startsWith (jlHome )) {
2286- String homeRelativePath = jlPath .substring (jlHome .length () + 1 );
2287- return homeResourcesFile .resolve (homeRelativePath );
2288- }
2289- }
22902279 TruffleFile f = env .getInternalTruffleFile (path .toJavaStringUncached ());
22912280 // 'isDirectory' does deliberately not follow symlinks because otherwise this could allow to
22922281 // escape the language home directory.
0 commit comments