Skip to content

fix: preserve file mtime after atomic rewrite#48

Open
leno23 wants to merge 1 commit into
dolph:mainfrom
leno23:fix/preserve-mtime-23
Open

fix: preserve file mtime after atomic rewrite#48
leno23 wants to merge 1 commit into
dolph:mainfrom
leno23:fix/preserve-mtime-23

Conversation

@leno23
Copy link
Copy Markdown

@leno23 leno23 commented May 17, 2026

Summary

  • Call os.Chtimes on the temp file before Rename so modification time matches the original file
  • Add regression test for mtime preservation

Fixes #23

Test plan

  • go test ./...

Made with Cursor

Call os.Chtimes on the temp file before rename so Make-style
dependency tracking and watchers see a stable modification time.

Fixes dolph#23

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mtime is not preserved after rewrite

1 participant