Skip to content

Commit

Permalink
Merge branch 'main' into doc-viewer-scroll-to-zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
cardionaut authored Mar 3, 2024
2 parents a16e250 + 54813e5 commit 5853f41
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public LatexParserResult parse(List<Path> latexFiles) {
List<Path> referencedFiles = new ArrayList<>();

for (Path file : latexFiles) {
if (!file.toFile().exists()) {
if (!Files.exists(file)) {
LOGGER.error("File does not exist: {}", file);
continue;
}
Expand Down Expand Up @@ -141,7 +141,7 @@ private void matchBibFile(Path file, String line) {
? bibString
: "%s%s".formatted(bibString, BIB_EXT));

if (bibFile.toFile().exists()) {
if (Files.exists(bibFile)) {
latexParserResult.addBibFile(file, bibFile);
}
}
Expand All @@ -160,7 +160,7 @@ private void matchNestedFile(Path texFile, List<Path> texFiles, List<Path> refer
? filenamePassedToInclude
: "%s%s".formatted(filenamePassedToInclude, TEX_EXT);
Path nestedFile = texFile.getParent().resolve(texFileName);
if (nestedFile.toFile().exists() && !texFiles.contains(nestedFile)) {
if (Files.exists(nestedFile) && !texFiles.contains(nestedFile)) {
referencedFiles.add(nestedFile);
}
}
Expand Down

0 comments on commit 5853f41

Please sign in to comment.