From 438b4809aec24779e8a7a7fd756fa6f87e27b67e Mon Sep 17 00:00:00 2001 From: lgemeinhardt Date: Tue, 22 Jan 2019 17:25:57 +0100 Subject: [PATCH] Support the workflow under Windows. #9 Fix to '/' for all operating system (including windows) in getRelativePath and getAbsolutePath, because the lookup map is using '/' as well --- .../java/com/google/j2cl/generator/OutputGeneratorStage.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transpiler/java/com/google/j2cl/generator/OutputGeneratorStage.java b/transpiler/java/com/google/j2cl/generator/OutputGeneratorStage.java index e04595dfa0..8498279d90 100644 --- a/transpiler/java/com/google/j2cl/generator/OutputGeneratorStage.java +++ b/transpiler/java/com/google/j2cl/generator/OutputGeneratorStage.java @@ -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; } }