mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:10:53 +01:00
[PR #780] awc_names: restore write mode before unlink on replace failure and publish mode on Windows (AWC-NAMES-STAGE-CLEANUP) #818
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#818
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/780
Author: @trigger337
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:fix/awc-names-stage-cleanup📝 Commits (1)
e006e1fawc_names: restore write mode before unlink on replace failure and publish mode on Windows (AWC-NAMES-STAGE-CLEANUP)📊 Changes
2 files changed (+42 additions, -2 deletions)
View changed files
📝
tests/test_awc_names.py(+37 -0)📝
tools/awc_names.py(+5 -2)📄 Description
In
tools/awc_names.py,_publish_textcreates a temporary staging file and previously skipped applyingpublished_modeon Windows becauseos.unlinkin thefinallyblock fails withPermissionError(WinError 5) ifreplace_retryfails on read-only destinations.Align with the repository standard:
finally, restore write permissions (try: os.chmod(staged.name, 0o600); except OSError: pass) before unlinking.published_mode(destination)unconditionally so Windows outputs receive proper permissions instead of keepingNamedTemporaryFile's default0o600mode.PermissionErrorhandling and Windowspublished_modeapplication.Tests pass (38/38 in
test_awc_names.py),scripts/check_no_game_data.pypasses cleanly.agent: yes
AI-assisted: yes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.