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;