changeset 143:173162d6eb1d

6759775: RegularFileObject.inferBinaryName gives bad result on empty path Reviewed-by: mcimadamore
author jjg
date Thu, 16 Oct 2008 07:30:13 -0700
parents 4feda9f0dbe7
children 2c1ef6ec9413
files src/share/classes/com/sun/tools/javac/file/RegularFileObject.java
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/javac/file/RegularFileObject.java	Wed Oct 15 13:20:03 2008 -0700
+++ b/src/share/classes/com/sun/tools/javac/file/RegularFileObject.java	Thu Oct 16 07:30:13 2008 -0700
@@ -89,6 +89,8 @@
         for (File dir: path) {
             //System.err.println("dir: " + dir);
             String dPath = dir.getPath();
+            if (dPath.length() == 0)
+                dPath = System.getProperty("user.dir");
             if (!dPath.endsWith(File.separator))
                 dPath += File.separator;
             if (fPath.regionMatches(true, 0, dPath, 0, dPath.length())