Skip to content

Commit

Permalink
Replaced / with OS-dependent path separator in the importedFileName…
Browse files Browse the repository at this point in the history
… to make sure that there is a match. (#85)

Signed-off-by: Ivan Malygin <ivan@swirldslabs.com>
  • Loading branch information
imalygin authored Aug 12, 2023
1 parent 6a73035 commit 1cd3ebf
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,9 @@ private void build(Iterable<File> allSrcFiles) {
// process imports
final Set<String> fileImports = protoFileImports.computeIfAbsent(fullQualifiedFile, key -> new HashSet<>());
for (var importStatement : parsedDoc.importStatement()) {
final String importedFileName = importStatement.strLit().getText().replaceAll("\"","");
final String importedFileName = importStatement.strLit().getText()
.replaceAll("\"","")
.replaceAll("/", FileSystems.getDefault().getSeparator());
// ignore standard google protobuf imports as we do not need them
if (importedFileName.startsWith("google/protobuf")) {
continue;
Expand Down

0 comments on commit 1cd3ebf

Please sign in to comment.