garydgregory commented on a change in pull request #187:
URL: https://github.com/apache/commons-io/pull/187#discussion_r558721162
##########
File path: src/main/java/org/apache/commons/io/FileUtils.java
##########
@@ -309,6 +309,9 @@ public static void cleanDirectory(final File directory)
throws IOException {
if (!causeList.isEmpty()) {
throw new IOExceptionList(causeList);
}
+ if (listFiles(directory, null).length > 0) {
+ throw new IOException("Directory " + directory + " is not empty,
cleaning attempt failed.");
Review comment:
This belongs in the unit test IMO.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]