< prev index next >

src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinExeBundler.java

Print this page

        

@@ -392,14 +392,19 @@
             throw new RuntimeException(MessageFormat.format(
                     getString("error.cannot-write-to-output-dir"),
                     outdir.getAbsolutePath()));
         }
 
-        if (WindowsDefender.isThereAPotentialWindowsDefenderIssue()) {
+        String tempDirectory = WindowsDefender.getUserTempDirectory();
+        if (Arguments.CLIOptions.context().userProvidedBuildRoot) {
+            tempDirectory = BUILD_ROOT.fetchFrom(p).getAbsolutePath();
+        }
+        if (WindowsDefender.isThereAPotentialWindowsDefenderIssue(
+                tempDirectory)) {
             Log.error(MessageFormat.format(
                     getString("message.potential.windows.defender.issue"),
-                    WindowsDefender.getUserTempDirectory()));
+                    tempDirectory));
         }
 
         // validate we have valid tools before continuing
         String iscc = TOOL_INNO_SETUP_COMPILER_EXECUTABLE.fetchFrom(p);
         if (iscc == null || !new File(iscc).isFile()) {
< prev index next >