mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-04 07:35:53 +00:00
[FIXED JENKINS-10113] try to work extra hard before giving up the file deletion.
This commit is contained in:
1 parent
599888fec1
commit
2c4516dcf2
1 file changed
+10
-1
@@ -302,7 +302,16 @@ public class Util {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in new issue
Block a user