Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
atomicallyWriteTo: remove temporary file prior to creating it
This change is the same in spirit to #19241. When using Bazel in combination with bb_clientd, bb_clientd may restore a copy of bazel-out/ from a snapshot. Files restored from the snapshot are not mutable, as they may be backed by other snapshots, a remote CAS, etc. etc. etc.. This change extends atomicallyWriteTo() to always write contents into a new file that is guaranteed to be writable. The logic that's added here is merely copy-pasted from what's already present at the bottom of the same function. Closes #19243. PiperOrigin-RevId: 571276901 Change-Id: I3963ad6218e1557271c2bb4de94e89538ff512af
- Loading branch information