-
Patch
-
Resolution: Fixed
-
Blocker
-
None
-
Windows
I can not find a way to attach a patch to bug 5313, so here it is.
Index: main/remoting/src/main/java/hudson/remoting/RemoteClassLoader.java =================================================================== --- main/remoting/src/main/java/hudson/remoting/RemoteClassLoader.java (revision 26080) +++ main/remoting/src/main/java/hudson/remoting/RemoteClassLoader.java (working copy) @@ -258,7 +258,20 @@ private File makeResource(String name, byte[] image) throws IOException { - File tmpFile = File.createTempFile("hudson-remoting", ""); + //work around sun bug 6325169 on windows + //see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6325169 + File tmpFile = null; + IOException lastException = null; + for(int i=0; i<100 && tmpFile==null; i++) { + try { + tmpFile = File.createTempFile("hudson-remoting", ""); + }catch(IOException e) { + lastException = e; + } + } + if(tmpFile == null) { + throw new IOException("Failed hard at creating a temp directory", lastException); + } tmpFile.delete(); File resource = new File(tmpFile, name); resource.getParentFile().mkdirs();
- duplicates
-
JENKINS-5313 Access denied while creating a temp file on Windows
-
- Closed
-
[JENKINS-5314] Patch for bug 5313
Link |
New:
This issue duplicates |
Resolution | New: Fixed [ 1 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
Status | Original: Resolved [ 5 ] | New: Closed [ 6 ] |
Workflow | Original: JNJira [ 135403 ] | New: JNJira + In-Review [ 203462 ] |