Skip to content

_util: drop the dead st_mtime=0 short-circuit in raise_on_not_writable_file#589

Merged
gaborbernat merged 1 commit into
tox-dev:mainfrom
HrachShah:fix/mtime-zero-still-checks-writability
Jul 8, 2026
Merged

_util: drop the dead st_mtime=0 short-circuit in raise_on_not_writable_file#589
gaborbernat merged 1 commit into
tox-dev:mainfrom
HrachShah:fix/mtime-zero-still-checks-writability

Conversation

@HrachShah

Copy link
Copy Markdown
Contributor

The guard predated the lstat-symlink hardening (PR #567) and was meant to defend against old platforms where os.stat could return an all-zero struct for a file that exists.

@gaborbernat gaborbernat force-pushed the fix/mtime-zero-still-checks-writability branch 2 times, most recently from 79fc7f4 to d1907b7 Compare July 8, 2026 05:15
@gaborbernat gaborbernat enabled auto-merge (squash) July 8, 2026 05:16
@gaborbernat gaborbernat force-pushed the fix/mtime-zero-still-checks-writability branch from d1907b7 to a33642f Compare July 8, 2026 05:22
Drop the noqa: RET506 suppression by removing the redundant else after
the win32 raise, and cut comments that restate the code.
@gaborbernat gaborbernat force-pushed the fix/mtime-zero-still-checks-writability branch from a33642f to 77d0652 Compare July 8, 2026 05:36
@gaborbernat gaborbernat disabled auto-merge July 8, 2026 05:36
@gaborbernat gaborbernat merged commit 1efb893 into tox-dev:main Jul 8, 2026
29 of 30 checks passed
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.

2 participants