mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-22 12:04:39 +02:00
6759775: RegularFileObject.inferBinaryName gives bad result on empty path
Reviewed-by: mcimadamore
This commit is contained in:
parent
a75a5f00d6
commit
ad3ca8d8f2
1 changed files with 2 additions and 0 deletions
|
@ -89,6 +89,8 @@ class RegularFileObject extends BaseFileObject {
|
||||||
for (File dir: path) {
|
for (File dir: path) {
|
||||||
//System.err.println("dir: " + dir);
|
//System.err.println("dir: " + dir);
|
||||||
String dPath = dir.getPath();
|
String dPath = dir.getPath();
|
||||||
|
if (dPath.length() == 0)
|
||||||
|
dPath = System.getProperty("user.dir");
|
||||||
if (!dPath.endsWith(File.separator))
|
if (!dPath.endsWith(File.separator))
|
||||||
dPath += File.separator;
|
dPath += File.separator;
|
||||||
if (fPath.regionMatches(true, 0, dPath, 0, dPath.length())
|
if (fPath.regionMatches(true, 0, dPath, 0, dPath.length())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue