1
0
Fork 0
Code Issues Pull requests Projects Releases 2 Packages Wiki Activity Actions Pages

Format Milestone 4 hardening code

This commit is contained in:
Andraxion 2026-07-29 15:05:11 -04:00
parent cca374bf99
commit 663811b1d3
2 changed files with 7 additions and 12 deletions

View file

@ -371,15 +371,12 @@ def _atomic_replace(
f"in {temporary_name}"
) from error
temporary_contains_only_staged_content = True
if (
not _same_identity_after_rename(
_file_identity(directory_fd, name),
displaced,
)
or not _same_identity_after_rename(
_file_identity(directory_fd, temporary_name),
staged,
)
if not _same_identity_after_rename(
_file_identity(directory_fd, name),
displaced,
) or not _same_identity_after_rename(
_file_identity(directory_fd, temporary_name),
staged,
):
raise CommandReferenceToolError(
"Output target raced publication and could not be safely restored"