Skip to content
Permalink
Browse files

[FIXED JENKINS-17343]

Don't break Windows XP, fall back gracefully to no-op.
  • Loading branch information
kohsuke committed Apr 2, 2013
1 parent 8aa9122 commit a016f3da07958202b13dd247dcac6766ea03a2aa
Showing with 10 additions and 0 deletions.
  1. +3 −0 changelog.html
  2. +3 −0 core/src/main/java/hudson/Util.java
  3. +4 −0 core/src/main/java/hudson/util/jna/Kernel32Utils.java
@@ -63,6 +63,9 @@
<div id="rc" style="display:none;"><!--=BEGIN=-->
<h3><a name=v1.510>What's new in 1.510</a> <!--=DATE=--></h3>
<ul class=image>
<li class=bug>
<tt>UnsatisfiedLinkError</tt> on <tt>CreateSymbolicLinkw</tt> on Windows XP.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-17343">issue 17343</a>)
<li class=bug>
Flyweight tasks should execute on the master if there's no static
executors available.
@@ -1065,6 +1065,9 @@ public static void createSymlink(File baseDir, String targetPath, String symlink
return;
}
throw e;
} catch (UnsatisfiedLinkError e) {
// not available on this Windows
return;
}
} else {
String errmsg = "";
@@ -80,6 +80,10 @@ public static int getWin32FileAttributes(File file) throws IOException {
* @param target
* If relative, resolved against the location of the symlink.
* If absolute, it's absolute.
* @throws UnsatisfiedLinkError
* If the function is not exported by kernel32.
* See http://msdn.microsoft.com/en-us/library/windows/desktop/aa363866(v=vs.85).aspx
* for compatibility info.
*/
public static void createSymbolicLink(File symlink, String target, boolean dirLink) throws IOException {
if (!Kernel32.INSTANCE.CreateSymbolicLinkW(

0 comments on commit a016f3d

Please sign in to comment.
You can’t perform that action at this time.