[PR #818] text_tables: restore write mode before unlink on replace failure and backup removal (TEXT-TABLES-STAGE-CLEANUP) #855

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

📋 Pull Request Information

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

Base: main ← Head: fix/text-tables-stage-cleanup


📝 Commits (1)

  • c2da03b text_tables: restore write mode before unlink on replace failure and backup removal (TEXT-TABLES-STAGE-CLEANUP)

📊 Changes

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

View changed files

📝 tests/test_text_tables.py (+25 -0)
📝 tools/text_tables.py (+2 -0)

📄 Description

When writing tables, if os.replace fails (for instance due to permission errors), resetting os.chmod to 0o600 ensures unlinking the temporary staging and backup files 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/818 **Author:** [@trigger337](https://github.com/trigger337) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/text-tables-stage-cleanup` --- ### 📝 Commits (1) - [`c2da03b`](https://github.com/ubiquitarianism/leonida/commit/c2da03b355303346ee8c4b37f1affd6a896ff4f8) text_tables: restore write mode before unlink on replace failure and backup removal (TEXT-TABLES-STAGE-CLEANUP) ### 📊 Changes **2 files changed** (+27 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_text_tables.py` (+25 -0) 📝 `tools/text_tables.py` (+2 -0) </details> ### 📄 Description When writing tables, if os.replace fails (for instance due to permission errors), resetting os.chmod to 0o600 ensures unlinking the temporary staging and backup files 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#855
No description provided.