Index: compiler/java/com/google/dart/compiler/util/Paths.java |
diff --git a/compiler/java/com/google/dart/compiler/util/Paths.java b/compiler/java/com/google/dart/compiler/util/Paths.java |
index d2a6b0de5c35d1a56431766a99136632d4748b72..ee42826f074be9bf236145d989d2f7bd2024c58e 100644 |
--- a/compiler/java/com/google/dart/compiler/util/Paths.java |
+++ b/compiler/java/com/google/dart/compiler/util/Paths.java |
@@ -30,6 +30,11 @@ public class Paths { |
int baseFilePathLen = baseFilePath.length(); |
int relFilePathLen = relFilePath.length(); |
+ // Check for empty cases |
+ if (baseFilePathLen == 0 && relFilePathLen == 0) { |
+ return relFilePath; |
+ } |
+ |
// Find the common path elements |
int index = 0; |
while (index < baseFilePathLen - 1 && index < relFilePathLen - 1) { |