@@ -975,7 +975,7 @@ private static long[] unixStat(TruffleFile file, LinkOption... linkOptions) thro
975
975
LAST_ACCESS_TIME ,
976
976
LAST_MODIFIED_TIME ,
977
977
UNIX_CTIME ), linkOptions );
978
- return setTimestamps (attributes , new long []{
978
+ return setTimestamps (attributes , UNIX_CTIME , new long []{
979
979
attributes .get (UNIX_MODE ),
980
980
attributes .get (UNIX_INODE ),
981
981
attributes .get (UNIX_DEV ),
@@ -1001,7 +1001,7 @@ private long[] posixStat(TruffleFile file, LinkOption... linkOptions) throws IOE
1001
1001
UNIX_GROUP ,
1002
1002
UNIX_PERMISSIONS ), linkOptions );
1003
1003
final Set <PosixFilePermission > posixFilePermissions = attributes .get (UNIX_PERMISSIONS );
1004
- return setTimestamps (attributes , new long []{
1004
+ return setTimestamps (attributes , CREATION_TIME , new long []{
1005
1005
posixPermissionsToMode (fileTypeBitsFromAttributes (attributes ), posixFilePermissions ),
1006
1006
getEmulatedInode (file ), // ino
1007
1007
0 , // dev
@@ -1040,7 +1040,7 @@ private long[] basicStat(TruffleFile file, LinkOption... linkOptions) throws IOE
1040
1040
mode |= 0100 ;
1041
1041
}
1042
1042
int inode = getEmulatedInode (file );
1043
- return setTimestamps (attributes , new long []{
1043
+ return setTimestamps (attributes , CREATION_TIME , new long []{
1044
1044
mode ,
1045
1045
inode , // ino
1046
1046
0 , // dev
@@ -1053,10 +1053,10 @@ private long[] basicStat(TruffleFile file, LinkOption... linkOptions) throws IOE
1053
1053
});
1054
1054
}
1055
1055
1056
- private static long [] setTimestamps (Attributes attributes , long [] statResult ) {
1056
+ private static long [] setTimestamps (Attributes attributes , TruffleFile . AttributeDescriptor < FileTime > ctimeDescriptor , long [] statResult ) {
1057
1057
FileTime atime = attributes .get (LAST_ACCESS_TIME );
1058
1058
FileTime mtime = attributes .get (LAST_MODIFIED_TIME );
1059
- FileTime ctime = attributes .get (UNIX_CTIME );
1059
+ FileTime ctime = attributes .get (ctimeDescriptor );
1060
1060
statResult [7 ] = fileTimeToSeconds (atime );
1061
1061
statResult [8 ] = fileTimeToSeconds (mtime );
1062
1062
statResult [9 ] = fileTimeToSeconds (ctime );
0 commit comments