Skip to content

Preserve modification time when setting access time - #271

Open
yuefdev wants to merge 1 commit into
jaraco:mainfrom
yuefdev:fix/access-time-preserve-modification
Open

yuefdev wants to merge 1 commit into
jaraco:mainfrom
yuefdev:fix/access-time-preserve-modification

Conversation

@yuefdev

@yuefdev yuefdev commented Oct 18, 2026

Copy link
Copy Markdown

Read st_mtime_ns when preserving the modification time in set_atime. It currently copies the old access time into mtime, so changing Path.atime also changes when the file appears to have been modified.

The regression fails before the one-line fix and checks nanosecond preservation. Full tox passes on Linux with 165 passed and one skipped, including Ruff and mypy. Windows tests encounter the machine's symlink permission restriction.

Includes a release note. Related to the author-closed #250.

Signed-off-by: Yusuf Efe <120668197+yuefdev@users.noreply.github.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.

1 participant