kshitijk4poor
98105f31f4
fix(file_ops): harden new-file umask chmod for portability
...
Follow-ups on top of #70888 's cherry-picked fix:
- Replace the $((0666 & ~0$u)) shell arithmetic with POSIX who-less
'chmod "=rw"'. zsh (reachable via _find_bash's $SHELL fallback on
bash-less hosts) parses leading-zero constants as decimal and silently
chmods a garbage mode (e.g. 0210); the symbolic form is spec-identical
across bash/dash/busybox-ash/zsh and degrades to mktemp's 0600
(pre-fix behavior) rather than corrupting perms if chmod rejects it.
- Move the new-file chmod after the content stream so the temp file
stays owner-writable while cat runs.
- Run the chmod on a '[ ! -e "$t" ]' check after cat instead of the
stat/else branch, keeping the overwrite path untouched.
- Update the stale perms comment #70856 called out (new files did NOT
land with default umask perms pre-fix).
- Tests: select the atomic-write script by content instead of call
order (the previous last-call capture only worked because the bare
MagicMock's falsy-exit early return suppressed later execs), assert
behavior at explicit umasks 0022/0002/0077 via parametrize, add an
overwrite mode-preservation regression guard, and dedupe the
real-subprocess env fake into make_real_subprocess_env() shared with
TestSearchFilesFallbackHiddenPaths.
(webtecnica's email mapping already exists in contributors/emails/ on
current main; the PR's check-attribution red was stale-base only.)
# Conflicts:
# tests/tools/test_file_operations.py
2026-07-31 14:22:38 +05:30
..
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 11:19:24 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 19:48:37 -07:00
2026-07-29 10:06:27 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 12:19:37 -07:00
2026-07-29 12:19:37 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 19:48:37 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 14:12:25 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 16:44:31 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 21:30:53 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-31 14:22:38 +05:30
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-30 15:20:09 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 19:48:37 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 21:30:53 -07:00
2026-07-29 13:39:40 -07:00
2026-07-24 17:10:39 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 19:48:37 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 15:12:28 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-30 15:20:09 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-28 14:31:24 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-30 03:35:35 +05:30
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 15:13:21 -07:00
2026-07-24 15:47:12 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 15:13:21 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 19:48:37 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-30 22:31:42 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 19:48:37 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-26 19:30:02 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-24 11:45:57 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 19:48:37 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 19:48:37 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-28 11:57:37 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-28 11:55:48 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-28 11:53:36 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 21:30:53 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-28 18:12:26 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-28 11:57:37 -07:00
2026-07-29 14:12:25 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 23:16:18 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 13:39:40 -07:00
2026-07-29 14:12:25 -07:00
2026-07-29 13:39:40 -07:00