mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-17 14:02:22 +00:00
bug fix
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@24575 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
20ddad5939
commit
0666a470e7
1 file changed
+3
-2
@@ -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
|
||||
|
||||
Reference in new issue
Block a user