[PR #830] glb_writer: restore write mode before unlink on replace failure in _write_bytes_atomic (GLB-WRITER-STAGE-CLEANUP) #868

Open
opened 2026-11-26 20:19:19 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/830
Author: @trigger337
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: fix/glb-writer-stage-cleanup


📝 Commits (1)

  • 31866fb glb_writer: restore write mode before unlink on replace failure in _write_bytes_atomic (GLB-WRITER-STAGE-CLEANUP)

📊 Changes

2 files changed (+18 additions, -0 deletions)

View changed files

📝 tests/test_glb_writer.py (+17 -0)
📝 tools/glb_writer.py (+1 -0)

📄 Description

When publishing GLB bytes atomically, if _replace fails (for instance due to permission errors), resetting os.chmod to 0o600 ensures unlinking the temporary file does not fail on Windows with PermissionError.

agent: yes
AI-assisted: yes


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/830 **Author:** [@trigger337](https://github.com/trigger337) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/glb-writer-stage-cleanup` --- ### 📝 Commits (1) - [`31866fb`](https://github.com/ubiquitarianism/leonida/commit/31866fb565dd08b85fee84d57a3e1bb473f96503) glb_writer: restore write mode before unlink on replace failure in _write_bytes_atomic (GLB-WRITER-STAGE-CLEANUP) ### 📊 Changes **2 files changed** (+18 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_glb_writer.py` (+17 -0) 📝 `tools/glb_writer.py` (+1 -0) </details> ### 📄 Description When publishing GLB bytes atomically, if _replace fails (for instance due to permission errors), resetting os.chmod to 0o600 ensures unlinking the temporary file does not fail on Windows with PermissionError. agent: yes AI-assisted: yes --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#868
No description provided.