Skip to content

Commit

Permalink
workaround for CSL error
Browse files Browse the repository at this point in the history
  • Loading branch information
Siedlerchr committed Oct 4, 2019
1 parent 79f9c86 commit b731a2b
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.nio.file.FileSystem;
import java.nio.file.FileSystemAlreadyExistsException;
import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.NoSuchFileException;
Expand Down Expand Up @@ -147,6 +148,11 @@ public static List<CitationStyle> discoverCitationStyles() {
try (FileSystem fs = FileSystems.newFileSystem(uri, Collections.emptyMap())) {
Path path = fs.getPath(STYLES_ROOT);
STYLES.addAll(discoverCitationStylesInPath(path));
} catch (FileSystemAlreadyExistsException e) {
try (FileSystem fs = FileSystems.getFileSystem(uri)) {
Path path = fs.getPath(STYLES_ROOT);
STYLES.addAll(discoverCitationStylesInPath(path));
}
}
} else {
STYLES.addAll(discoverCitationStylesInPath(Paths.get(uri)));
Expand Down

0 comments on commit b731a2b

Please sign in to comment.