From bbfcccd0962ff4c2a37bf57404c12a9a60c3586f Mon Sep 17 00:00:00 2001 From: alexander_matveev Date: Fri, 9 May 2025 16:33:51 -0700 Subject: [PATCH] 8356664: [macos] AppContentTest fails after JDK-8352480 --- test/jdk/tools/jpackage/share/AppContentTest.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/jdk/tools/jpackage/share/AppContentTest.java b/test/jdk/tools/jpackage/share/AppContentTest.java index ef34c375fc3c0..15b6176356223 100644 --- a/test/jdk/tools/jpackage/share/AppContentTest.java +++ b/test/jdk/tools/jpackage/share/AppContentTest.java @@ -162,13 +162,16 @@ private static Path copyAppContentPath(Path appContentPath) throws IOException { private static Path createAppContentLink(Path appContentPath) throws IOException { var appContentArg = TKit.createTempDirectory("app-content"); + Path dstPath; if (copyInResources) { - appContentArg = appContentArg.resolve(RESOURCES_DIR).resolve(LINKS_DIR); - } else { + appContentArg = appContentArg.resolve(RESOURCES_DIR); + dstPath = appContentArg.resolve(LINKS_DIR) + .resolve(appContentPath.getFileName()); + } else { appContentArg = appContentArg.resolve(LINKS_DIR); + dstPath = appContentArg.resolve(appContentPath.getFileName()); } - var dstPath = appContentArg.resolve(appContentPath.getFileName()); Files.createDirectories(dstPath.getParent()); // Create target file for a link