Browse Source

multiple parallel mkdirs could make each other fail. PR 49572

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@962483 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 15 years ago
parent
commit
87fe422628
2 changed files with 10 additions and 0 deletions
  1. +4
    -0
      WHATSNEW
  2. +6
    -0
      src/main/org/apache/tools/ant/taskdefs/Mkdir.java

+ 4
- 0
WHATSNEW View File

@@ -96,6 +96,10 @@ Fixed bugs:
resourcelist in the documentation (getting the first available resource
from a mirror list).

* A race condition could lead to build failures if multiple <mkdir>
tasks were trying to create the same directory.
Bugzilla Report 49572.

Other changes:
--------------



+ 6
- 0
src/main/org/apache/tools/ant/taskdefs/Mkdir.java View File

@@ -59,6 +59,12 @@ public class Mkdir extends Task {
if (!dir.exists()) {
boolean result = mkdirs(dir);
if (!result) {
if (dir.exists()) {
log("A different process or task has already created "
+ "dir " + dir.getAbsolutePath(),
Project.MSG_VERBOSE);
return;
}
String msg = "Directory " + dir.getAbsolutePath()
+ " creation was not successful for an unknown reason";
throw new BuildException(msg, getLocation());


Loading…
Cancel
Save