Skip to content

Create missing directories before saving a PNG - #621

Merged
stanoddly merged 2 commits into
mainfrom
issue-614
Oct 5, 2026
Merged

stanoddly merged 2 commits into
mainfrom
issue-614

Conversation

@botoddly

@botoddly botoddly commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

Fixes #614.

  • SdlImageWriter.SavePng creates the missing parent directories of its path before writing the PNG. This covers the headless screenshot <path> command, which saves through it.
  • A path that still cannot be written, such as one whose parent is a file, keeps throwing out of the frame loop.
  • docs/headless.md says that missing directories are created, both for screenshot and for IImageWriter.

An app that registers its own IImageWriter does not get this behavior.

Verification

  • Pixely.Tests filtered to SdlImageWriterTests and the input automation tests pass (95). A new test saves into a nested path that does not exist yet. Another checks that a parent that is a file throws IOException.
  • Not tested: a full headless run, Windows and macOS.

@stanoddly
stanoddly enabled auto-merge (squash) October 5, 2026 13:04
@stanoddly
stanoddly merged commit 3570ad7 into main Oct 5, 2026
2 checks passed
@stanoddly
stanoddly deleted the issue-614 branch October 5, 2026 13:12
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

📦 Development package Pixely 0.0.112 is available.

Workflow run (attempt 1)

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

✅ Development package validation passed on all platforms.

Workflow run (attempt 1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Headless screenshot should create the missing directories of its path

2 participants