Skip to content

fix(utilities): use GetInvalidPathChars in CleanPath#29

Merged
jaybarden1 merged 1 commit into
mainfrom
bug/28-clean-path-linux-separator
May 23, 2026
Merged

fix(utilities): use GetInvalidPathChars in CleanPath#29
jaybarden1 merged 1 commit into
mainfrom
bug/28-clean-path-linux-separator

Conversation

@jaybarden1

Copy link
Copy Markdown
Contributor

Summary

  • CleanPath in PathOperationExtensions was calling Path.GetInvalidFileNameChars() on full paths
  • On Linux, that set includes /, so every path separator was replaced with a space
  • Switched to Path.GetInvalidPathChars() which excludes / on all platforms

Closes #28

Test plan

  • Start a scrape on Linux
  • Verify images save to the correct target path without spaces replacing /
  • Verify DirectoryHelper.CreateDirectoryIfRequired creates the correct directory
  • Verify ImageSaveHelper.SaveImage writes to the correct path

🤖 Generated with Claude Code

GetInvalidFileNameChars includes '/' on Linux, causing CleanPath to
replace all path separators with spaces when called on full paths.
Switch to GetInvalidPathChars which excludes '/' on all platforms.

Closes #28

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jaybarden1 jaybarden1 requested a review from a team May 23, 2026 19:05
@jaybarden1 jaybarden1 enabled auto-merge (squash) May 23, 2026 19:06

@jbarden jbarden left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops... interestingly, the GetInvalidDineNameChars was from the original, duplicated, code

@jaybarden1 jaybarden1 merged commit b728882 into main May 23, 2026
5 checks passed
@jaybarden1 jaybarden1 deleted the bug/28-clean-path-linux-separator branch May 23, 2026 19:17
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.

Save Path is broken

2 participants