git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@24575 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2009-12-12 00:00:16 +00:00
1 parent 20ddad5939
commit 0666a470e7
1 file changed
+3 -2
+3 -2
View File
@@ -1014,9 +1014,10 @@ public class Util {
Memory m = new Memory(sz);
int r = GNUCLibrary.LIBC.readlink(filename,m,new NativeLong(sz));
if (r<0) {
if (r==22/*EINVAL --- but is this really portable?*/)
int err = Native.getLastError();
if (err==22/*EINVAL --- but is this really portable?*/)
return null; // this means it's not a symlink
throw new IOException("Failed to readlink "+link+" error="+Native.getLastError());
throw new IOException("Failed to readlink "+link+" error="+ err);
}
if (r==sz)
continue; // buffer too small