Skip to content

Commit

Permalink
Fix source path
Browse files Browse the repository at this point in the history
  • Loading branch information
xpenatan committed Jan 28, 2024
1 parent d182093 commit ac51d8d
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ public IDLClassGeneratorParser(String basePackage, String headerCMD, IDLReader i
this.cppDir = cppDir;
this.basePackage = basePackage;
this.idlReader = idlReader;
if(this.cppDir != null) {
this.cppDir = this.cppDir.replace("\\", "/");
}
}

@Override
Expand Down Expand Up @@ -144,7 +147,11 @@ private HashMap<String, String> getClassCppPath() {
for(String path : filesFromDir) {
if(!path.endsWith(".h"))
continue;
path = path.replace("\\", "/");
String include = path.replace(cppDir, "");
if(include.startsWith("/")) {
include = include.replaceFirst("/", "");
}
String out = include.replace(".h", "");

Path p = Paths.get(out);
Expand Down

0 comments on commit ac51d8d

Please sign in to comment.