[PR #832] dds_png: restore write mode before unlink on replace failure in main (DDS-PNG-STAGE-CLEANUP) #872

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

📋 Pull Request Information

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

Base: main ← Head: fix/dds-png-stage-cleanup


📝 Commits (1)

  • b5dd9ac dds_png: restore write mode before unlink on replace failure in main (DDS-PNG-STAGE-CLEANUP)

📊 Changes

2 files changed (+25 additions, -1 deletions)

View changed files

📝 tests/test_dds_png.py (+20 -0)
📝 tools/dds_png.py (+5 -1)

📄 Description

When previewing/saving PNG in CLI main(), if os.replace fails after shutil.copymode set the destination's permissions, resetting os.chmod to 0o600 ensures TemporaryDirectory cleanup does not fail with PermissionError on Windows if the output was read-only.

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/832 **Author:** [@trigger337](https://github.com/trigger337) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/dds-png-stage-cleanup` --- ### 📝 Commits (1) - [`b5dd9ac`](https://github.com/ubiquitarianism/leonida/commit/b5dd9acbb6de86b17d19be3c3ae5e34601191341) dds_png: restore write mode before unlink on replace failure in main (DDS-PNG-STAGE-CLEANUP) ### 📊 Changes **2 files changed** (+25 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_dds_png.py` (+20 -0) 📝 `tools/dds_png.py` (+5 -1) </details> ### 📄 Description When previewing/saving PNG in CLI main(), if os.replace fails after shutil.copymode set the destination's permissions, resetting os.chmod to 0o600 ensures TemporaryDirectory cleanup does not fail with PermissionError on Windows if the output was read-only. 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#872
No description provided.