Skip to content
Permalink
Browse files
[FIXED JENKINS-17343]
Don't break Windows XP, fall back gracefully to no-op.
(cherry picked from commit a016f3d)

Conflicts:
	changelog.html
  • Loading branch information
kohsuke authored and vjuranek committed Apr 14, 2013
1 parent 3aaca05 commit 606dea7ab0bf36ac29695ef0c0c383a8b08c593f
Showing with 7 additions and 0 deletions.
  1. +3 −0 core/src/main/java/hudson/Util.java
  2. +4 −0 core/src/main/java/hudson/util/jna/Kernel32Utils.java
@@ -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 606dea7

Please sign in to comment.