src/share/classes/java/io/File.java

Print this page

        

*** 1341,1360 **** return false; } if (mkdir()) { return true; } ! File canonFile = null; ! try { ! canonFile = getCanonicalFile(); ! } catch (IOException e) { return false; } ! ! File parent = canonFile.getParentFile(); ! return (parent != null && (parent.mkdirs() || parent.exists()) && ! canonFile.mkdir()); } /** * Renames the file denoted by this abstract pathname. * --- 1341,1356 ---- return false; } if (mkdir()) { return true; } ! File parent = getParentFile(); ! if (parent == null) { return false; } ! parent.mkdirs(); ! return mkdir(); } /** * Renames the file denoted by this abstract pathname. *