From e53bbec6c1a576e70ac75a1d71dc6325069ad4d8 Mon Sep 17 00:00:00 2001 From: kohsuke Date: Mon, 3 Sep 2007 15:51:15 +0000 Subject: [PATCH] fix for #585 was incomplete. Modified to properly detect symlinks, anywhere in the tree. git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@4617 71c3de6d-444a-0410-be80-ed276b4c234a --- core/src/main/java/hudson/Util.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/hudson/Util.java b/core/src/main/java/hudson/Util.java index b34cdb2e07..5b0f0aad08 100644 --- a/core/src/main/java/hudson/Util.java +++ b/core/src/main/java/hudson/Util.java @@ -115,11 +115,8 @@ public class Util { File[] files = file.listFiles(); if(files==null) return; // the directory didn't exist in the first place - for (File child : files) { - if (child.isDirectory()) - deleteContentsRecursive(child); - deleteFile(child); - } + for (File child : files) + deleteRecursive(child); } private static void deleteFile(File f) throws IOException { -- GitLab