diff --git a/core/src/main/java/hudson/Util.java b/core/src/main/java/hudson/Util.java index c9f55ea6cc..ae9ac1a904 100644 --- a/core/src/main/java/hudson/Util.java +++ b/core/src/main/java/hudson/Util.java @@ -137,8 +137,8 @@ public class Util { LOGGER.log(Level.INFO,"Failed to chmod "+f,e); } - throw new IOException("Unable to delete " + f.getPath()); - + if(!f.delete() && f.exists()) + throw new IOException("Unable to delete " + f.getPath()); } }