Repository: flex-falcon Updated Branches: refs/heads/develop 8e3e0af7c -> 6b7bc48d1
FLEX-35359 fixed issue where absolute path for output compiler option on windows could result in empty source map file Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/6b7bc48d Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/6b7bc48d Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/6b7bc48d Branch: refs/heads/develop Commit: 6b7bc48d1efabdb3d02ae14ea21fed12880a2eaa Parents: 8e3e0af Author: Josh Tynjala <[email protected]> Authored: Thu Sep 28 15:33:11 2017 -0700 Committer: Josh Tynjala <[email protected]> Committed: Thu Sep 28 15:33:11 2017 -0700 ---------------------------------------------------------------------- .../apache/flex/compiler/internal/codegen/js/JSWriter.java | 9 +++++++++ 1 file changed, 9 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/6b7bc48d/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/JSWriter.java ---------------------------------------------------------------------- diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/JSWriter.java b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/JSWriter.java index 2013c66..e123115 100644 --- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/JSWriter.java +++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/JSWriter.java @@ -143,6 +143,11 @@ public class JSWriter implements IJSWriter //should be able to replace this method private String relativePath(String filePath, String relativeToFilePath) { + boolean caseInsensitive = System.getProperty("os.name").toLowerCase().startsWith("windows"); + if(caseInsensitive) + { + relativeToFilePath = relativeToFilePath.toLowerCase(); + } File currentFile = new File(filePath); Stack<String> stack = new Stack<String>(); stack.push(currentFile.getName()); @@ -150,6 +155,10 @@ public class JSWriter implements IJSWriter while (currentFile != null) { String absoluteCurrentFile = currentFile.getAbsolutePath() + File.separator; + if(caseInsensitive) + { + absoluteCurrentFile = absoluteCurrentFile.toLowerCase(); + } if (relativeToFilePath.startsWith(absoluteCurrentFile)) { String relativeRelativeToFile = relativeToFilePath.substring(absoluteCurrentFile.length());
