Skip to content

Commit a66a125

Browse files
author
Gary Gregory
committed
No need to check if the directory already exists.
Files.createDirectories() Javadoc states that an exception is not thrown if the directory could not be created because it already exists.
1 parent c5ca539 commit a66a125

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

src/main/java/org/apache/commons/io/file/PathUtils.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,9 +308,6 @@ public static Path createParentDirectories(final Path path, final FileAttribute<
308308
if (parent == null) {
309309
return null;
310310
}
311-
if (Files.isDirectory(parent)) {
312-
return parent;
313-
}
314311
return Files.createDirectories(parent, attrs);
315312
}
316313

0 commit comments

Comments
 (0)