mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-08 01:26:03 +00:00
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:
1 parent
613713ca51
commit
65890a2fb3
1 file changed
+7
@@ -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());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user