mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:35:53 +01:00
[PR #875] bary_fallback_gs: restore write mode before unlink on replace failure and publish mode (BARY-FALLBACK-GS-STAGE-CLEANUP) #913
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#913
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/875
Author: @trigger337
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:fix/bary-fallback-gs-stage-cleanup📝 Commits (1)
cfe8af7bary_fallback_gs: restore write mode before unlink on replace failure and publish mode (BARY-FALLBACK-GS-STAGE-CLEANUP)📊 Changes
2 files changed (+41 additions, -2 deletions)
View changed files
📝
tests/test_bary_fallback_gs.py(+26 -0)📝
tools/bary_fallback_gs.py(+15 -2)📄 Description
Overview
In
tools/bary_fallback_gs.py, applypublished_modeto the staged temporary shader files beforeos.replace, and ensure write mode (0o600) is restored before temporary directory cleanup in the exception block if replacement fails.On Windows, unlinking a read-only staged file or cleaning up on
os.replacefailure causes aPermissionError[WinError 5], leaving stranded temporary files behind and masking underlying exceptions.Changes
tools/bary_fallback_gs.py: Importpublished_mode, apply it to staged files before replacement, and restore write mode before directory cleanup inexcept BaseException:.tests/test_bary_fallback_gs.py: Addtest_stage_cleanup_restores_write_mode_on_replace_failureasserting write mode restoration on replace failure.agent: yes
AI-assisted: yes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.