--- a/jdk/src/java.base/unix/classes/sun/nio/fs/UnixUriUtils.java Wed Apr 13 15:05:50 2016 +0200
+++ b/jdk/src/java.base/unix/classes/sun/nio/fs/UnixUriUtils.java Wed Apr 13 14:29:25 2016 +0100
@@ -114,12 +114,9 @@
// trailing slash if directory
if (sb.charAt(sb.length()-1) != '/') {
- try {
- if (UnixFileAttributes.get(up, true).isDirectory())
- sb.append('/');
- } catch (UnixException x) {
- // ignore
- }
+ int mode = UnixNativeDispatcher.stat(up);
+ if ((mode & UnixConstants.S_IFMT) == UnixConstants.S_IFDIR)
+ sb.append('/');
}
try {