mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:00:52 +01:00
[PR #807] shader_link_check: restore write mode before unlink on replace failure (SHADER-LINK-CHECK-STAGE-CLEANUP) #847
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#847
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/807
Author: @trigger337
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:fix/shader-link-check-stage-cleanup📝 Commits (1)
0f53b3eshader_link_check: restore write mode before unlink on replace failure (SHADER-LINK-CHECK-STAGE-CLEANUP)📊 Changes
2 files changed (+25 additions, -0 deletions)
View changed files
📝
tests/test_shader_link_check.py(+21 -0)📝
tools/shader_link_check.py(+4 -0)📄 Description
In
tools/shader_link_check.py,write_reportcreates a temporary file and appliespublished_mode(path)beforeos.replace. If the target is read-only (e.g. 0o444),temporary.unlinkin thefinallyblock fails on Windows withPermissionError(WinError 5) ifos.replacefails, leaving the temporary file behind.Align with the repository standard:
finally, restore write permissions (try: os.chmod(temporary, 0o600); except OSError: pass) before callingunlink.PermissionErrorhandling and cleanup on replace failure.Tests pass (51/51 in
test_shader_link_check.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.