Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8180519

Windows FILETIME should be converted to and from ULARGE_INTEGER not LARGE_INTEGER

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P5 P5
    • 10
    • 9
    • core-libs
    • b09
    • windows
    • Not verified

      In src/java.base/windows/native/libjava/WinNTFileSystem_md.c the FILETIME retrieved by GetFileTime() should be converted to a ULARGE_INTEGER, and the ULARGE_INTEGER derived from the tiime parameter of Java_java_io_WinNTFileSystem_setLastModifiedTime() should be converted to a ULARGE_INTEGER before being converted to the FILETIME passed to SetFileTime().

      In particular, in the FILETIME structure documentation it is stated that "[...] you should copy the low- and high-order parts of the file time to a ULARGE_INTEGER structure [...]"

            bpb Brian Burkhalter
            bpb Brian Burkhalter
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: