[FIXED JENKINS-17681] Do not try to call resolveSymlink on a nonexistent link as you will just get an IOException, breaking peephole permalinks in some Windows environments.

This commit is contained in:
Jesse Glick committed 2013-05-01 20:13:18 -04:00
1 parent 00d5e38759
commit 3c2b50ecfe
3 files changed
+16 -1

No files matched your search

+4
View File
@@ -1200,6 +1200,10 @@ public class Util {
} catch (ClassNotFoundException x3) {
assert false : x3; // should be Java 7+ here
}
if (x2.getClass().getName().equals("java.nio.file.FileSystemException")) {
// Thrown ("Incorrect function.") on JDK 7u21 in Windows 2012 when called on a non-symlink, rather than NotLinkException, contrary to documentation. Maybe only when not on NTFS?
return null;
}
if (x2 instanceof IOException) {
throw (IOException) x2;
}