Skip to content
Permalink
Browse files
[FIXED JENKINS-10113] try to work extra hard before giving up the fil…
…e deletion.
  • Loading branch information
kohsuke committed Jun 29, 2011
1 parent 599888f commit 2c4516dcf2db59727eec9180886fa39cc9f78a1a
Showing with 10 additions and 1 deletion.
  1. +10 −1 core/src/main/java/hudson/Util.java
@@ -302,7 +302,16 @@ private static void makeWritable(File f) {
public static void deleteRecursive(File dir) throws IOException {
if(!isSymlink(dir))
deleteContentsRecursive(dir);
deleteFile(dir);
try {
deleteFile(dir);
} catch (IOException e) {
// if some of the child directories are big, it might take long enough to delete that
// it allows others to create new files, causing problemsl ike JENKINS-10113
// so give it one more attempt before we give up.
if(!isSymlink(dir))
deleteContentsRecursive(dir);
deleteFile(dir);
}
}

/*

0 comments on commit 2c4516d

Please sign in to comment.