Skip to content

Commit 1c021e4

Browse files
committed
mutiplying our potential user base by a magnitued of x100 by making it work on windows
1 parent 77d312f commit 1c021e4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/uno/anahata/ai/tools/spi/ClasspathPrinter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ public static String prettyPrint(String classpath) {
5353
for (String entry : entries) {
5454
File file = new File(entry);
5555
if (file.exists() && file.isFile() && entry.endsWith(".jar")) {
56-
String[] pathParts = file.getParent().split(File.separator);
56+
String[] pathParts = file.getParent().split(java.util.regex.Pattern.quote(File.separator));
5757
TreeNode currentNode = root;
5858
for (String part : pathParts) {
5959
if (part.isEmpty()) continue;
6060
currentNode = currentNode.children.computeIfAbsent(part, TreeNode::new);
6161
}
6262
currentNode.jars.add(file.getName());
6363
} else if (file.exists() && file.isDirectory()) {
64-
String[] pathParts = file.getAbsolutePath().split(File.separator);
64+
String[] pathParts = file.getAbsolutePath().split(java.util.regex.Pattern.quote(File.separator));
6565
TreeNode currentNode = root;
6666
for (String part : pathParts) {
6767
if (part.isEmpty()) continue;

0 commit comments

Comments
 (0)