Skip to content

Commit

Permalink
Support the workflow under Windows. google#9
Browse files Browse the repository at this point in the history
Fix to '/' for all operating system (including windows) in
getRelativePath and getAbsolutePath, because the lookup map is using '/'
as well
  • Loading branch information
lgemeinhardt authored and Lars Gemeinhardt committed Mar 1, 2019
1 parent 346935e commit 438b480
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -279,13 +279,13 @@ private static String getRelativePath(Type type) {
TypeDeclaration typeDeclaration = type.getDeclaration();
String typeName = typeDeclaration.getSimpleBinaryName();
String packageName = typeDeclaration.getPackageName();
return packageName.replace(".", File.separator) + File.separator + typeName;
return packageName.replace(".", "/") + '/' + typeName;
}

/** Returns the absolute binary path for a given type. */
private static String getAbsolutePath(CompilationUnit compilationUnit, Type type) {
TypeDeclaration typeDeclaration = type.getDeclaration();
String typeName = typeDeclaration.getSimpleBinaryName();
return compilationUnit.getDirectoryPath() + File.separator + typeName;
return compilationUnit.getDirectoryPath() + '/' + typeName;
}
}

0 comments on commit 438b480

Please sign in to comment.