6759775: RegularFileObject.inferBinaryName gives bad result on empty path

Reviewed-by: mcimadamore
This commit is contained in:
Jonathan Gibbons 2008-10-16 07:30:13 -07:00
parent a75a5f00d6
commit ad3ca8d8f2

View file

@ -89,6 +89,8 @@ class RegularFileObject extends BaseFileObject {
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())