File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
test/jdk/java/nio/file/attribute/BasicFileAttributeView Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -106,11 +106,12 @@ static void test(Path top) throws IOException {
106
106
supportsCreationTimeWrite = true ;
107
107
}
108
108
} else if (Platform .isLinux ()) {
109
- // Creation time read depends on statx system call support
110
- supportsCreationTimeRead = Linker .nativeLinker ().defaultLookup ().find ("statx" ).isPresent ();
111
- // Linux system doesn't support birth time on tmpfs filesystem for now
112
- if ( Files .getFileStore (file ).type ().contentEquals ("tmpfs" ) ) {
113
- supportsCreationTimeRead = false ;
109
+ // Creation time read depends on statx system call support and on the file
110
+ // system storing the birth time. The tmpfs file system type does not store
111
+ // the birth time.
112
+ boolean statxIsPresent = Linker .nativeLinker ().defaultLookup ().find ("statx" ).isPresent ();
113
+ if (statxIsPresent && !Files .getFileStore (file ).type ().contentEquals ("tmpfs" )) {
114
+ supportsCreationTimeRead = true ;
114
115
}
115
116
// Creation time updates are not supported on Linux
116
117
supportsCreationTimeWrite = false ;
You can’t perform that action at this time.
0 commit comments