--- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacAppStoreBundler.java Thu Jun 13 19:34:44 2019 -0400
+++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacAppStoreBundler.java Fri Jun 14 12:04:12 2019 -0400
@@ -121,16 +121,8 @@
File outdir) throws PackagerException {
Log.verbose(MessageFormat.format(I18N.getString(
"message.building-bundle"), APP_NAME.fetchFrom(params)));
- if (!outdir.isDirectory() && !outdir.mkdirs()) {
- throw new PackagerException(
- "error.cannot-create-output-dir",
- outdir.getAbsolutePath());
- }
- if (!outdir.canWrite()) {
- throw new PackagerException(
- "error.cannot-write-to-output-dir",
- outdir.getAbsolutePath());
- }
+
+ IOUtils.writableOutputDir(outdir.toPath());
// first, load in some overrides
// icns needs @2 versions, so load in the @2 default