Skip to content

Commit

Permalink
Quick fix CSL errors (#5389)
Browse files Browse the repository at this point in the history
  • Loading branch information
koppor committed Oct 17, 2019
2 parents d16d1a2 + b731a2b commit 1fd53bf
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 1fd53bf

Please sign in to comment.