mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:10:53 +01:00
[PR #798] rtti_scan: restore write mode before unlink on replace failure (RTTI-SCAN-STAGE-CLEANUP) #836
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#836
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/798
Author: @trigger337
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:fix/rtti-scan-stage-cleanup📝 Commits (1)
a6ff1f4rtti_scan: restore write mode before unlink on replace failure (RTTI-SCAN-STAGE-CLEANUP)📊 Changes
2 files changed (+27 additions, -0 deletions)
View changed files
📝
tests/test_rtti_scan.py(+23 -0)📝
tools/rtti_scan.py(+4 -0)📄 Description
In
tools/rtti_scan.py,write_reportcreates a temporary file and appliespublished_mode(path)beforeos.replace. If the target is read-only (e.g. 0o444),os.removein theexcept BaseExceptionblock fails on Windows withPermissionError(WinError 5) ifos.replacefails, leaving the temporary file behind.Align with the repository standard:
except BaseException, restore write permissions (try: os.chmod(tmp, 0o600); except OSError: pass) before callingos.remove.PermissionErrorhandling and cleanup on replace failure.Tests pass (31/31 in
test_rtti_scan.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.