Skip to content

fix(image-page): remove RootDirectory from path to fix doubled path (#30)#31

Merged
jaybarden1 merged 2 commits into
mainfrom
bug/30-skia-sharp-doubled-path
May 23, 2026
Merged

fix(image-page): remove RootDirectory from path to fix doubled path (#30)#31
jaybarden1 merged 2 commits into
mainfrom
bug/30-skia-sharp-doubled-path

Conversation

@jaybarden1

@jaybarden1 jaybarden1 commented May 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • BaseSaveDirectory is already an absolute path; prepending RootDirectory via CombinePath (Path.Join) produced doubled paths like /home/user//home/user/Pictures/...
  • SKImage.FromEncodedData returned null because the doubled path did not resolve to a real file
  • Removed RootDirectory from the CombinePath call in ImagePage.GetImageFromPage
  • Removed File.Delete on SKImage null (was incorrectly deleting valid downloaded files due to the bad path)
  • Added diagnostic logging for SKImage found/not-found to aid future debugging
  • Fixed FileDetailRepository to use AsAsyncEnumerable().CountAsync to avoid EF Core translation issues

Closes #30

Test plan

  • Build passes with zero errors/warnings (dotnet build)
  • Run a scrape workflow and confirm paths in logs no longer contain doubled segments
  • Confirm SKImage.FromEncodedData returns non-null for downloaded images
  • Confirm image dimensions are recorded in the database

🤖 Generated with Claude Code

)

BaseSaveDirectory is already an absolute path; prepending RootDirectory
via CombinePath (Path.Join) produced doubled paths like
/home/user//home/user/Pictures/... causing SKImage.FromEncodedData to
return null. Drop RootDirectory from the CombinePath call.

Also remove File.Delete on SKImage null (was deleting valid files due
to the bad path) and add diagnostic logging for found/not-found cases.

Fix FileDetailRepository to use AsAsyncEnumerable().CountAsync to avoid
EF Core translation issues.

Closes #30

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jaybarden1 jaybarden1 requested a review from a team May 23, 2026 19:25
@jaybarden1 jaybarden1 enabled auto-merge (squash) May 23, 2026 19:28
@jaybarden1 jaybarden1 merged commit c76349a into main May 23, 2026
5 checks passed
@jaybarden1 jaybarden1 deleted the bug/30-skia-sharp-doubled-path branch May 23, 2026 19:29
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.

SKIA Sharp is not returning image data

2 participants