Skip to content

Commit 54fdb90

Browse files
committed
java:inode: use absolute for Java 1.8 stability
1 parent 8f4d6eb commit 54fdb90

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

+stdlib/+java/inode.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
function i = inode(p)
22

33
opt = javaMethod("values", "java.nio.file.LinkOption");
4-
i = javaMethod("getAttribute", "java.nio.file.Files", javaPathObject(p), "unix:ino", opt);
4+
5+
jp = javaPathObject(stdlib.absolute(p));
6+
% Java 1.8 benefits from the absolute() for stability--it's not an issue
7+
% on every computer.
8+
9+
i = javaMethod("getAttribute", "java.nio.file.Files", jp, "unix:ino", opt);
510

611
i = uint64(i);
712
end

0 commit comments

Comments
 (0)