Format Milestone 4 hardening code
This commit is contained in:
parent
cca374bf99
commit
663811b1d3
2 changed files with 7 additions and 12 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue