Github user StephanEwen commented on a diff in the pull request: https://github.com/apache/flink/pull/3219#discussion_r98478136 --- Diff: flink-core/src/main/java/org/apache/flink/util/FileUtils.java --- @@ -148,14 +158,49 @@ public static void deleteDirectory(File directory) throws IOException { return; } - // delete the directory. this fails if the directory is not empty, meaning - // if new files got concurrently created. we want to fail then. - try { - Files.delete(directory.toPath()); - } - catch (NoSuchFileException ignored) { - // if someone else deleted this concurrently, we don't mind - // the result is the same for us, after all + java.nio.file.Path directoryPath = directory.toPath(); + if (OperatingSystem.isWindows()) { + // delete the directory. this fails if the directory is not empty, meaning --- End diff -- How about moving this to a separate method for readability?
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---