try to make it writable by using a Mustang feature.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@5368 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2007-10-21 04:37:12 +00:00
1 parent 613713ca51
commit 65890a2fb3
1 file changed
+7
+7
View File
@@ -137,6 +137,13 @@ public class Util {
LOGGER.log(Level.INFO,"Failed to chmod "+f,e);
}
// also try JDK6-way of doing it.
try {
f.setWritable(true);
} catch (NoSuchMethodError e) {
// not JDK6
}
if(!f.delete() && f.exists())
throw new IOException("Unable to delete " + f.getPath());
}