You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: eliminate TOCTOU races in ln and tac by deferring is_dir() checks (#10991)
* fix: improve error handling for file operations in tac and ln commands
* fix: eliminate TOCTOU races in ln and tac by deferring is_dir() checks
ln: call hard_link() first, check is_dir() only on failure for diagnostics
tac: remove is_dir()/metadata() pre-checks, open file directly and let OS report errors (EISDIR, ENOENT)
Closes#9450
* fix(tac): update tests for cross-platform error messages and strip_errno
- Remove `(os error 28)` from test_failed_write_is_reported expectation
to match the intentional strip_errno() behavior
* fix(tac): improve error message formatting for file not found scenario
0 commit comments