Skip to content

Commit

Permalink
[FIXED JENKINS-15316] Harmless but noisy exception running builds on …
Browse files Browse the repository at this point in the history
…some Windows systems in non-English locale.

Falling back to just checking for ‘FileSystemException’ since detail message about missing required privilege may be translated.
  • Loading branch information
jglick committed Oct 15, 2012
1 parent 3e7fcc9 commit ced5c44
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion changelog.html
Expand Up @@ -55,7 +55,9 @@
<!-- Record your changes in the trunk here. -->
<div id="trunk" style="display:none"><!--=TRUNK-BEGIN=-->
<ul class=image>
<li class=>
<li class=bug>
Harmless but noisy exception running builds on some Windows systems in non-English locale.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-15316">issue 15316</a>)
</ul>
</div><!--=TRUNK-END=-->

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/Util.java
Expand Up @@ -1071,7 +1071,7 @@ private static boolean createSymlinkJava7(File baseDir, String targetPath, Strin
if (x2 instanceof UnsupportedOperationException) {
return true; // no symlinks on this platform
}
if (Functions.isWindows() && String.valueOf(x2).contains("A required privilege is not held by the client.")) {
if (Functions.isWindows() && String.valueOf(x2).contains("java.nio.file.FileSystemException")) {
if (warnedSymlinks.compareAndSet(false, true)) {
LOGGER.warning("Symbolic links enabled on this platform but disabled for this user; run as administrator or use Local Security Policy > Security Settings > Local Policies > User Rights Assignment > Create symbolic links");
}
Expand Down

0 comments on commit ced5c44

Please sign in to comment.