Skip to content

Skip Finder's Icon\r folder-icon file instead of failing it [patch] - #164

Open
matt-edmondson wants to merge 3 commits into
mainfrom
fix/163-finder-icon-file
Open

matt-edmondson wants to merge 3 commits into
mainfrom
fix/163-finder-icon-file

Conversation

@matt-edmondson

Copy link
Copy Markdown
Contributor

Fixes #163

What changed

IsFileManagerMetadata now skips Finder's custom-folder-icon file, "Icon\r" (an empty data fork; the icon is in the resource fork). Before, it was decoded, failed with UnknownImageFormatException, and made an otherwise clean batch exit 2. The match is ordinal and exact, so a plain Icon file, or one that differs in case, is still treated as an input.

Tests

  • TreatsFindersCustomFolderIconFileAsMetadata: unit check on IsFileManagerMetadata, cross-platform.
  • SkipsFindersCustomFolderIconFileWithoutCountingItAsFailed: a batch holding star.png plus an empty Icon\r returns BatchResult(1, 0) and exit 0. Windows can't create a file name containing CR, so this one reports Inconclusive there.

Both tests fail with the fix reverted and pass with it in place. The full suite passes on Linux: 90 passed, 0 failed.

Note: restore on main currently fails locally with NU1903, because SixLabors.ImageSharp 3.1.12 has a high-severity advisory. #145 bumps it. I ran the suite with -p:NuGetAudit=false.


Generated by Claude Code

Finder writes an empty "Icon\r" file when a folder gets a custom icon. It
was decoded as an input, failed, and made an otherwise clean batch exit 2.
IsFileManagerMetadata now skips it alongside .DS_Store and desktop.ini.

Fixes #163

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017vfJW4hvLssY2rDFbS3wDM
3.1.12 carries GHSA-v76p-62qx-wwq2, and NuGet audit warnings are errors,
so restore fails on main and on every PR. Ported from #145.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017vfJW4hvLssY2rDFbS3wDM

matt-edmondson commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor Author

This PR's CI is red because of main, not this change, and the fix is a maintainer decision.

To unblock main and this PR, choose one of these:

  • Add a Six Labors license key as SixLaborsLicenseKey.
  • Suppress this advisory with <NuGetAuditSuppress Include="https://github.com/advisories/GHSA-v76p-62qx-wwq2" /> while you decide.
  • Move off ImageSharp.

The tests for this change pass locally on 3.1.12 with the audit turned off: 90 passed, 0 failed.


Generated by Claude Code

… license

3.2.0 is the only release that fixes GHSA-v76p-62qx-wwq2, but its build
targets fail any CI build that has no SixLaborsLicenseKey. Picking a
license, an audit suppression or another library is a maintainer decision,
so this PR goes back to main's dependency set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017vfJW4hvLssY2rDFbS3wDM
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.

macOS's "Icon\r" custom-folder-icon file counts as a failed icon, so an otherwise clean batch exits 2

2 participants