提交 0666a470 编写于 作者: K kohsuke

bug fix

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@24575 71c3de6d-444a-0410-be80-ed276b4c234a
上级 20ddad59
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册