Skip to content

Commit

Permalink
fix windows
Browse files Browse the repository at this point in the history
- add missing brackets around ?:
  • Loading branch information
hkiel committed Jan 25, 2023
1 parent 035630d commit a2771f3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions resources/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,12 @@ source.repository=https://github.com/hkiel/JavaDoc.git
# This is used to compare different versions of the same Tool, and check if an
# update is available.

tool.version=4
tool.version=5


# The version as the user will see it.

tool.prettyVersion=1.0.3
tool.prettyVersion=1.0.4


# The min and max revision of Processing compatible with your Tool.
Expand Down
7 changes: 4 additions & 3 deletions src/javadoc/tool/JavaDoc.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,14 @@ public static List<String> findFiles(Path path, String fileExtension) throws IOE
List<String> result;

try (Stream<Path> walk = Files.walk(path)) {
System.out.println("Walking "+path.toString());
result = walk
.filter(p -> !Files.isDirectory(p))
// this is a path, not string,
// convert path to string first
.map(p -> p.toString().toLowerCase())
.map(p -> p.toAbsolutePath().toString())
// this only test if pathname ends with a certain extension
.filter(f -> f.endsWith(fileExtension))
.filter(f -> f.toLowerCase().endsWith(fileExtension))
.collect(Collectors.toList());
}

Expand All @@ -97,7 +98,7 @@ private String getJarsInDir(Path path) {
try {
List<String> files = findFiles(path, "jar");
if (!files.isEmpty()) {
extraLibs = isWindows?";":":" + String.join(isWindows?";":":", files);
extraLibs = (isWindows?";":":") + String.join(isWindows?";":":", files);
}
} catch (IOException e) {
e.printStackTrace();
Expand Down

0 comments on commit a2771f3

Please sign in to comment.