Repository navigation
Skip Finder and Explorer metadata files instead of counting them as failed [patch] - #142
Conversation
…ailed [patch] ProcessDirectory handed every file in the input folder to the decoder, so .DS_Store, ._ AppleDouble files, Thumbs.db, ehthumbs.db and desktop.ini each counted as a failed icon and printed a decoder dump. Any folder a Mac or Windows file manager had opened then exited 2 even though every icon was written. Skip dot-files and those names (case-insensitively) before decoding, counting them as neither written nor failed. Ordinary non-image files such as notes.txt still count as failed. Fixes #135 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_019FkGdWB8Ko3mTn9JiBH973
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_019FkGdWB8Ko3mTn9JiBH973
|
CI status: No fix exists yet. 3.1.12 is the last 3.x release on nuget.org, so clearing this means upgrading to ImageSharp 4.x (a major-version and licence decision) or explicitly accepting the advisories. Either belongs in its own PR. With the audit disabled locally, the full suite passes (82/82). The code-quality findings on the new test are addressed in 564f400 ( Generated by Claude Code |
NuGet audit reports five advisories against SixLabors.ImageSharp 3.1.12, and with warnings as errors NU1902/NU1903 fail restore on every build. No 3.1.x release patches them; the fix is 4.x, which moved to a split licence, so the 3.1.x pin stays and each advisory is suppressed by name. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013j5p1tUWLykEtnhAziUkZa
| <NuGetAuditSuppress Include="https://github.com/advisories/GHSA-j3p4-wp97-rph4" /> | ||
| <NuGetAuditSuppress Include="https://github.com/advisories/GHSA-j9gm-c75j-xc9q" /> | ||
| <NuGetAuditSuppress Include="https://github.com/advisories/GHSA-jjfr-hcj7-qf5w" /> | ||
| <NuGetAuditSuppress Include="https://github.com/advisories/GHSA-gwg2-r3hj-4w44" /> | ||
| <NuGetAuditSuppress Include="https://github.com/advisories/GHSA-wmxv-xphr-5c9g" /> |
|



Fixes #135
What changed
ProcessDirectorypassed every file in--inputto the decoder..DS_Store,._*AppleDouble files,Thumbs.db,ehthumbs.dbanddesktop.inieach counted as a failed icon, so any folder a Mac or Windows file manager had opened exited 2 even when every icon was written.These entries are now skipped before decoding and counted as neither written nor failed. The new
IconHelper.IsFileManagerMetadataskips:.Thumbs.db,ehthumbs.dbanddesktop.ini, case-insensitivelyOrdinary non-image files keep the current behaviour:
ContinuesAfterAFileThatCannotBeDecodedstill countsnotes.txtas failed. The optional items in the issue (Hidden/System attribute check, one-line decoder message) are left out to keep this PR small.Tests
SkipsFileManagerMetadataWithoutCountingItAsFailed: a folder with.DS_Store,._good.png,desktop.ini,THUMBS.DB,ehthumbs.dband one valid PNG givesBatchResult(1, 0)andExitSuccess.BatchResult { Written = 1, Failed = 5 }. With the fix it passes.-p:NuGetAudit=falseandgit lfs pull; see the note below.mainno longer restores. NuGet audit now reports five advisories againstSixLabors.ImageSharp3.1.12 (GHSA-gwg2-r3hj-4w44, GHSA-j3p4-wp97-rph4, GHSA-j9gm-c75j-xc9q, GHSA-jjfr-hcj7-qf5w, GHSA-wmxv-xphr-5c9g), and warnings-as-errors turns them intoNU1902/NU1903errors. #141 fails the same way on all three OSes. No patched 3.1.x exists on nuget.org (3.1.12 is the last 3.x release; the next is 4.0.0). Moving to 4.x is a major-version and licence decision, so it isn't in this PR.🤖 Generated with Claude Code
https://claude.ai/code/session_019FkGdWB8Ko3mTn9JiBH973
Generated by Claude Code