You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2021/10/12 15:47:55 UTC
[sling-org-apache-sling-feature-launcher] 01/01: SLING-10867 - The
launcher should fail fast when it can't create parent directories for the
application feature file
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch issue/SLING-10867
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature-launcher.git
commit bee51f556a8f9558bfde404346041685890afa85
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Tue Oct 12 17:46:35 2021 +0200
SLING-10867 - The launcher should fail fast when it can't create parent directories for the application feature file
---
src/main/java/org/apache/sling/feature/launcher/impl/Bootstrap.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/sling/feature/launcher/impl/Bootstrap.java b/src/main/java/org/apache/sling/feature/launcher/impl/Bootstrap.java
index f6f259f..e157073 100644
--- a/src/main/java/org/apache/sling/feature/launcher/impl/Bootstrap.java
+++ b/src/main/java/org/apache/sling/feature/launcher/impl/Bootstrap.java
@@ -20,6 +20,7 @@ import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.net.URL;
+import java.nio.file.Files;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
@@ -210,7 +211,7 @@ public class Bootstrap {
// write application back
final File file = getApplicationFeatureFile(this.config);
- file.getParentFile().mkdirs();
+ Files.createDirectories(file.getParentFile().toPath());
try (final FileWriter writer = new FileWriter(file))
{