Skip to content

Last modified date isn't preserved when copying file to file share #18

@buttercookie42

Description

@buttercookie42

If I copy a file (using Windows Explorer) to a jfileserver share (using version 1.4.0), the last modified date isn't preserved.

Looking at a Wireshark capture, what happens during the file copy is that

  1. The file is created
  2. The file is being written to.
  3. SetFileInformation is called to set the last modified date to the source file's date.
  4. The file is closed.

I strongly suspect that the bug happens because writing to a file only increments its write count, but doesn't yet update the file's last modified date. That process only happens when the file is being closed, with the unfortunate side effect that any SetFileInformation calls that happened between the last file write and the file being closed therefore get overwritten.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions