diff --git a/projects/Closure/9/com/google/javascript/jscomp/ProcessCommonJSModules.java b/projects/Closure/9/com/google/javascript/jscomp/ProcessCommonJSModules.java index 2987bda..6777957 100644 --- a/projects/Closure/9/com/google/javascript/jscomp/ProcessCommonJSModules.java +++ b/projects/Closure/9/com/google/javascript/jscomp/ProcessCommonJSModules.java @@ -116,6 +116,7 @@ public static String toModuleName(String requiredFilename, private String normalizeSourceName(String filename) { // The DOS command shell will normalize "/" to "\", so we have to // wrestle it back. + filename = filename.replace("\\", "/"); if (filename.indexOf(filenamePrefix) == 0) { filename = filename.substring(filenamePrefix.length()); @@ -180,7 +181,7 @@ private void visitScript(NodeTraversal t, Node script) { Preconditions.checkArgument(scriptNodeCount == 1, "ProcessCommonJSModules supports only one invocation per " + "CompilerInput / script node"); - String moduleName = guessCJSModuleName(normalizeSourceName(script.getSourceFileName())); + String moduleName = guessCJSModuleName(script.getSourceFileName()); script.addChildToFront(IR.var(IR.name(moduleName), IR.objectlit()) .copyInformationFromForTree(script)); if (reportDependencies) {