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

(fs) Files.move should use MOVEFILE_WRITE_THROUGH flag (win)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • tbd
    • 7, 21
    • core-libs
    • None

      On Windows, Files.move is implemented with MoveFileEx. It seems that this function can complete before the file is actually moved on the disk. The MOVEFILE_WRITE_THROUGH flag makes it wait until the file has been moved - the implications of this in all scenarios will need to be examined.

      More context in this bug report to nio-dev:
      https://mail.openjdk.org/pipermail/nio-dev/2023-February/013252.html

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

              Created:
              Updated:
              Resolved: