From 0b6bbf11f082ef7b3b43249d24844bbadc43d187 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20W=C3=B6gerer?= Date: Mon, 19 May 2025 13:19:33 +0200 Subject: [PATCH] Prevent new substitutions for bundle apply without create --- .../src/com/oracle/svm/driver/BundleSupport.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/substratevm/src/com.oracle.svm.driver/src/com/oracle/svm/driver/BundleSupport.java b/substratevm/src/com.oracle.svm.driver/src/com/oracle/svm/driver/BundleSupport.java index 47d3a8d15d2f..e8ff82a615a6 100644 --- a/substratevm/src/com.oracle.svm.driver/src/com/oracle/svm/driver/BundleSupport.java +++ b/substratevm/src/com.oracle.svm.driver/src/com/oracle/svm/driver/BundleSupport.java @@ -450,6 +450,11 @@ private Path substitutePath(Path origPath, Path destinationDir) { return rootDir.resolve(previousRelativeSubstitutedPath); } + if (!this.writeBundle && destinationDir != auxiliaryOutputDir) { + /* If this is bundle-apply only, no new substitutions needed for input paths. */ + return origPath; + } + if (origPath.startsWith(nativeImage.config.getJavaHome())) { /* If origPath comes from native-image itself, substituting is not needed. */ return origPath;