Skip to content

Commit

Permalink
Resolve fun pathing issue on Windows
Browse files Browse the repository at this point in the history
Not replacing it, means `language/language.proto` is not found in the Map on Windows. Updating just the key, results in a duplicate file found with different path, as it still loads the import and from the directory pathing.
  • Loading branch information
busches authored Apr 3, 2024
1 parent 3d44395 commit b1d8292
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ private Map<String, ProtoFile> loadFilesWithLocations() {
files.filter(p -> !Files.isDirectory(p) && p.toString().endsWith(".proto"))
.forEach(path -> {
// relative path will be used as "import" statement
String relativePath = baseLocation.relativize(path).toString();
String relativePath = baseLocation.relativize(path).toString().replace("\\", "/");
var protoFileElement = ProtoParser.Companion.parse(
Location.get(baseLocation.toString(), relativePath),
readFileAsString(path)
Expand Down

0 comments on commit b1d8292

Please sign in to comment.