Commit 7f8e55a0 by Per Bothner

File.java (mkdirs): Handle a null parent directory.

h
	* java/io/File.java (mkdirs):  Handle a null parent directory.

From-SVN: r26903
parent c41dc2ff
......@@ -190,10 +190,14 @@ public class File implements Serializable
if (x.isDirectory())
return true;
String p = x.getPath();
x.setPath(x.getParent());
if (! mkdirs (x))
return false;
x.setPath(p);
String parent = x.getParent();
if (parent != null)
{
x.setPath(parent);
if (! mkdirs (x))
return false;
x.setPath(p);
}
return x.mkdir();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment