mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:00:52 +01:00
[PR #783] awc_shorts: restore write mode before unlink on replace failure and publish mode on Windows (AWC-SHORTS-STAGE-CLEANUP) #820
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#820
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/783
Author: @trigger337
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:fix/awc-shorts-stage-cleanup📝 Commits (1)
33b4029awc_shorts: restore write mode before unlink on replace failure and publish mode on Windows (AWC-SHORTS-STAGE-CLEANUP)📊 Changes
2 files changed (+40 additions, -2 deletions)
View changed files
📝
tests/test_awc_shorts.py(+35 -0)📝
tools/awc_shorts.py(+5 -2)📄 Description
In
tools/awc_shorts.py,_write_catalogcreates a temporary 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 (18/18 in
test_awc_shorts.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.