From 108795a034c3300c7988fb849bfe63f72cb55cb9 Mon Sep 17 00:00:00 2001 From: Alexander Dyuzhev Date: Fri, 1 Dec 2023 23:26:22 +0300 Subject: [PATCH] issue fixing, #98 --- src/main/java/org/metanorma/MetanormaCollectionManifest.java | 2 +- src/main/java/org/metanorma/MetanormaCover.java | 2 +- src/main/java/org/metanorma/ScriptCollection.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/metanorma/MetanormaCollectionManifest.java b/src/main/java/org/metanorma/MetanormaCollectionManifest.java index 811924c..e21a0ae 100644 --- a/src/main/java/org/metanorma/MetanormaCollectionManifest.java +++ b/src/main/java/org/metanorma/MetanormaCollectionManifest.java @@ -33,7 +33,7 @@ public MetanormaCollectionManifest(String outputPath, List> inputOut public void generate() throws IOException { // get repository root folder from 1st file String repositoryRootFolder = Util.getRepositoryRootFolder(inputOutputFiles.get(0).getValue()); - if (repositoryRootFolder.isEmpty() && outputPath != null) { + if (repositoryRootFolder.isEmpty() && outputPath != null && !outputPath.isEmpty()) { String parentOutputPath = new File(outputPath).getParent(); repositoryRootFolder = parentOutputPath; } diff --git a/src/main/java/org/metanorma/ScriptCollection.java b/src/main/java/org/metanorma/ScriptCollection.java index 582e5f6..53b88e1 100644 --- a/src/main/java/org/metanorma/ScriptCollection.java +++ b/src/main/java/org/metanorma/ScriptCollection.java @@ -26,7 +26,7 @@ public ScriptCollection(String outputPath, List> inputO public void generate() throws IOException { // get repository root folder from 1st file String repositoryRootFolder = Util.getRepositoryRootFolder(inputOutputFiles.get(0).getValue()); - if (repositoryRootFolder.isEmpty() && outputPath != null) { + if (repositoryRootFolder.isEmpty() && outputPath != null && !outputPath.isEmpty()) { String parentOutputPath = new File(outputPath).getParent(); repositoryRootFolder = parentOutputPath; }